Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> SQL statement using 'IN' clause
Hi,
How can I include a wild card match when using the 'IN' clause? Ie, I am wanting to pull out a list of addresses depending on the postcode.
select * from contact where postcode in ('OX6 3NZ', 'OX6 3AZ', etc..)
would work, but what I want to do is :
select * from contact where postcode in ( like 'OX6%', like 'L1%', etc..)
Ie, so I can pull out a lot of postcodes without having to define them all specifically. Is it possible to combine 'IN' and 'LIKE'? Or do I have to use 750 'where' clauses :)
Please cc replies to 'russ_at_u-net.net'
Thanks in anticipation,
Russell.
--
Russell Fray
U-NET Ltd.
Received on Fri Sep 25 1998 - 06:15:54 CDT
![]() |
![]() |