Re: SELECT Question

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Tue, 17 Jun 2008 18:40:14 +0200
Message-ID: <4857e8f0$0$14357$e4fe514c@news.xs4all.nl>

"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 Received on Tue Jun 17 2008 - 11:40:14 CDT

Original text of this message