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

Home -> Community -> Usenet -> c.d.o.server -> Dynamic FOR IN mySQL_String LOOP doSomething END LOOP, 8i

Dynamic FOR IN mySQL_String LOOP doSomething END LOOP, 8i

From: COAST <coast_at_cedes.com>
Date: Mon, 22 Aug 2005 17:24:42 +0200
Message-ID: <4309ee3c$0$25593$4d4ef98e@read.news.ch.uu.net>


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

Original text of this message

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