Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL versus Pro*C
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); }
![]() |
![]() |