Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL versus Pro*C

PL/SQL versus Pro*C

From: gp <gp_at_gp>
Date: Thu, 3 Sep 1998 18:16:05 +0100
Message-ID: <904856474.19001.0.nnrp-02.c2de48da@news.demon.co.uk>


Hello,

 Is there a way to do the following using PL/SQL (avoiding temporary tables)?
Using Pro*C is almost trivial.

Thanks in advance,
greg

exec sql

    open cursor c1 for

           select A
           from table1;

for(;;)
{

   exec sql fetch cursor c1 into :varA;    if(ORA_NOT_FOUND)
     break;
   else

     {
         printf("%.*s\n", varA.len, varA.arr);
         exec sql
              select B
              into :varB
              from table2
              where C= :varA;
         printf("%.*s\n", varB.len, varB.arr);
       }

} Received on Thu Sep 03 1998 - 12:16:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US