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

Home -> Community -> Usenet -> c.d.o.misc -> Re: "in" clause using binds / oo4o / asp

Re: "in" clause using binds / oo4o / asp

From: tojo <Tojo_at_hotmail.com>
Date: Tue, 3 Feb 2004 15:04:01 +0100
Message-ID: <MPG.1a89c8b8c8cbbbce9896d3@news.t-online.de>


In article <Xns94848C89B2C5ENothanksnoaddresscom_at_127.0.0.1>, Nothanks_at_noaddress.com says...
> "Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.net> wrote in
> news:PtNTb.209118$I06.2316754_at_attbi_s01:
> > "John" <Nothanks_at_noaddress.com> wrote in message
> > news:Xns948488D28205BNothanksnoaddresscom_at_127.0.0.1...
> >> Is it possible?
> >>
> >> seems to be quite a negative vibe :)
> >>
> >> Oracle 8.1.7.latest SE ideally!
> >>
> >> Thanks
> > Yes, why would it not be?
> > select ... from ... where x in (:hvone,:hvtwo,:hvthree); for 3 elements
> >
> > This won't work
> >:hvone='a,b,c'
> > select ... from ... where x in (:hvone); as an equivalent to above.
>
> Perhaps I needed to state that the amount of values in the "IN" is unknown.
> Hence I want to pass in an array, not a list of binds.
>
> Cheers
>

If the amount of values is unknown, you may want to insert them into a (temporary) table and use either a normal join or:

  select ... from ... where x in (select x from temp_table);

Received on Tue Feb 03 2004 - 08:04:01 CST

Original text of this message

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