Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Decode / Case in IN_LIST

Re: Decode / Case in IN_LIST

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Tue, 10 Dec 2002 21:01:00 +0300
Message-ID: <at5a4u$a75$1@babylon.agtel.net>


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...

> 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?
Received on Tue Dec 10 2002 - 12:01:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US