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: Trying to use "where in" to select from a list

Re: Trying to use "where in" to select from a list

From: Peter Winters <peterw_at_trinitysoftware.com.au>
Date: Wed, 19 Jan 2000 10:27:14 +1000
Message-ID: <newscache$bx3kof$gtm$1@news.iig.com.au>


Syntax for IN function as follows:

select * from tblOrgPeople where strPeopleFirstName IN("Peter","Mark")

Regards
Peter Winters
CAIRNS ,QLD, AUSTRALIA. <ellisjb_at_my-deja.com> wrote in message news:862p33$skd$1_at_nnrp1.deja.com...
> A simplified example: my table has two columns, data (varchar) and
> Contents (varchar). I want to store a list of integers in Contents,
> e.g. '1,2,3,4,5', and do a query like
>
> select data from mytable where 2 in contents;
>
> But this setup doesn't give the desired results; apparently, a
> comma-delimited list in a column can't be used in a "where ... in"
> query this way.
>
> Is there a simple way to accomplish this? Or do I need to have
> to re-organize my tables?
>
> Thanks,
>
> Jonathan Ellis
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Jan 18 2000 - 18:27:14 CST

Original text of this message

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