Re: SELECT Question

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


On Tue, 17 Jun 2008 18:40:14 +0200, "Shakespeare" <whatsin_at_xs4all.nl> wrote:

>
>"gazzag" <gareth_at_jamms.org> schreef in bericht
>news:d4eb97aa-40e8-468d-b9e7-df0451a39d69_at_x41g2000hsb.googlegroups.com...
>On 17 Jun, 17:27, Mtek <m..._at_mtekusa.com> wrote:
>> Hi,
>>
>> Quick question here, if I have a WHERE clause with an IN condition -
>> WHERE var IN (1, 2, 3)......
>>
>> What if the list is dynamic? How would you do that? The column in
>> the table is numeric. Do I have to 'build' the select statement?
>>
>> Thanks!
>>
>> John
>
>Look into EXECUTE IMMEDIATE and wave scalability goodbye :)
>
>-g
>
>-------------------------------------
>Or write a function returning 1 if the value is ok, 0 if not and use
>
>where your_function(var) = 1;
>
>
>You can't build an index on it, though (not even function based, because the
>function is not deterministic)
>
>Shakespeare
>

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:47 CDT

Original text of this message