Sunday 15 August 2010

database - stored procedure to add movie into queue -



database - stored procedure to add movie into queue -

i have next code add together title customer's film list or queue. please tell me i'm doing wrong/not doing create work.

create or replace procedure add_movie_queue (memberid_arg in number, dvdtitle_arg in varchar2, dateaddedinqueue_arg in date, queueposition_arg in integer) next_movie integer; current_month integer; begin select count(*) current_month rental memberid = memberid_arg , rentalreturneddate null; select dvdid next_movie rentalqueue rentalqueue.memberid = memberid_arg , dateaddedinqueue_arg = (select min(dateaddedinqueue) rentalqueue memberid = memberid_arg); insert rentalqueue(memberid,dvdid,dateaddedinqueue,queueposition) values(memberid_arg,next_movie,dateaddedinqueue_arg,queueposition_arg); end;

database oracle

No comments:

Post a Comment