Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Dynamic FOR IN mySQL_String LOOP doSomething END LOOP, 8i
Hi list
I'm looking for a mecano like this.
mySQL_String := 'select count(*) from table A'
FOR tempData IN (mySQL_String)
LOOP
doSomethingWithTempData;
END LOOP;
Is this possible? Because it's annoying to implement different section for each case of the needed SQL.
Because may be I need this:
mySQL_String := 'select count(*) from table A where myField1 = 'Hello''
or
mySQL_String := 'select count(*) from table A where myField2 = 'WhatYouNeed''
or ....
or...
So I want to concatenate mySQL_String dynamically and use allways the same FOR IN command.
Thanks
Peter
Received on Mon Aug 22 2005 - 10:24:42 CDT
![]() |
![]() |