Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 835 of 2,288    |
|    GUEST to All    |
|    Re: Where do SQL/PL programs execute fro    |
|    21 Dec 03 21:25:40    |
   
   267707b5   
   From: a@b.com   
      
   On 19 Dec 2003 23:49:14 -0800 faheemrao@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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca