Re: SELECT Question

From: <sybrandb_at_hccnet.nl>
Date: Tue, 17 Jun 2008 21:37:28 +0200
Message-ID: <gj4g541373o27anr97vultc5tou2skvdib@4ax.com>


On Tue, 17 Jun 2008 21:20:54 +0200, Frank van Bortel <frank.van.bortel_at_gmail.com> wrote:

>Mtek wrote:
>
>> WHERE ol.order_id = co.order_id
>> AND ol.product_id = p.product_id
>> AND ol.order_item_id = z.order_item_id(+)
>> AND p.type = 3
>> AND co.order_id IN (............)
>> AND co.customer_id = p_customer_id;
>>
>> I will need to loop through this CURSOR or SELECT many times. And,
>> the IN clause goes where the ........ are located.
>>
>> So, is all of this supposed to use an EXECUTE IMMEDIATE statement?
>> Can I loop using that???
>
>As others tried to tell you: DON'T!
>
>Consider a global temporary table, and you that. IN lists
>are bugger anyway

Go to http://asktom.oracle.com, and search for 'dynamic IN list'  

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Tue Jun 17 2008 - 14:37:28 CDT

Original text of this message