Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Decode / Case in IN_LIST
Just put a your query for IN_LIST into a function returning a nested table
and then use it like this:
select ... from ...
where column in
(select * from TABLE(CAST( f(condition) AS nested_table_t )) )
Don't think you can pull off something similar with case or decode(), though I may be wrong here.
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "Craig Markowitz" <craigmarkowitz_at_hotmail.com> wrote in message news:b578cb81.0212100717.78a11da1_at_posting.google.com...Received on Tue Dec 10 2002 - 12:01:00 CST
> Is there a way to use the decode() or case() function in an IN_LIST
> and pass a list of values?
>
> Basically the psudo code is:
>
> select ... from ...
> where column in (if a then everything, else :value_list)
>
> Has anyone tried this successfully?