Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: where something IN decode
DStevens <dstevens_at_navidec.com> wrote in message news:<a2k12j$8ju$2_at_newsreader.mailgate.org>...
> select * from dual where 0 in (decode(0,0,1));
>
>
> >
Thanks DStevens, but what I need is a decode statement that allows me to have a set of numbers for the in statement. Something that would be akin to:
If the decode is true:
select * from dual where 0 in (0,1,2);
otherwise:
select * from dual where 0 in (0);
I'm using hardcoded values for an example, this is part of a far more complex SQL query.
Thanks,
Zzesers
Received on Tue Jan 22 2002 - 15:37:47 CST