Re: Where do SQL/PL programs execute from ?

From: GUEST <a_at_b.com>
Date: Sun, 21 Dec 2003 21:25:40 GMT
Message-ID: <MPG.1a4fda86377a3864989680_at_nntp.slnt.phub.net.cable.rogers.com>


On 19 Dec 2003 23:49:14 -0800 faheemrao_at_yahoo.com says...
> One way to execute it to make it a stored procedure at the end of code
> and another end;
> like this
> creat or replace procedure Test is
>
> cursor bc is select * from bank;
> > cursor brc (bn bank.b#%type) is select t#, city from branch where bn =
> > branch.b#;
> > cursor cc (cbn bank.b#%type, ctn branch.t#%type) is
> > select distinct customer.c#, customer.name, customer.status,
> > customer.city, account.balance from customer, account
> > where account.c# = customer.c# and account.b# = cbn and account.t# =
> > ctn;
> > begin
> > dbms_output.put_line
> > ('+==============================================+');
> > dbms_output.put_line('| Bank# Name City
> > |');
> > dbms_output.put_line
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> cursor bc is select * from bank;
> > cursor brc (bn bank.b#%type) is select t#, city from branch where bn =
> > branch.b#;
> > cursor cc (cbn bank.b#%type, ctn branch.t#%type) is
> > select distinct customer.c#, customer.name, customer.status,
> > customer.city, account.balance from customer, account
> > where account.c# = customer.c# and account.b# = cbn and account.t# =
> > ctn;
> > begin
> > dbms_output.put_line
> > ('+==============================================+');
> > dbms_output.put_line('| Bank# Name City
> > |');
> > dbms_output.put_line
>
> and remove the declare keyword

Ok thanks I'll give it a try...

-- 
inderpaul_s1234 AT yahoo DOT com

To reply please remove the "1234" and translate the rest.
Received on Sun Dec 21 2003 - 22:25:40 CET

Original text of this message