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: SQL: Combine LIKE and IN statement?

Re: SQL: Combine LIKE and IN statement?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Wed, 11 Feb 2004 13:14:53 -0800
Message-ID: <1076534044.676382@yasure>


Bob wrote:

> Can anyone tell me how to improve the following:
>
> Select tbl.city
> From tbl
> Where tbl.city like 'B%' or
> tbl.city like 'G%' or
> tbl.city like 'R%'
>
> I was trying:
> Where tbl.city like in ('B%', 'G%', 'R%')
> But apparently this is not the right way.
>
>
> Thanx,
> Bob

Perform an OR expansion.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Wed Feb 11 2004 - 15:14:53 CST

Original text of this message

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