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: is it possible 2 use IN(..) instead of c1 like 'a%' or c1 like 'b%'

Re: is it possible 2 use IN(..) instead of c1 like 'a%' or c1 like 'b%'

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Tue, 05 Feb 2002 21:52:55 GMT
Message-ID: <3C605436.55780AE9@ci.seattle.wa.us>


I only suggested it on the assumption that other parts of the WHERE clause might require flexibility. But you are correct.

Daniel Morgan

Steffen Ramlow wrote:

> isn't this the same as:
>
> where c1 like 'a%' or c1 like 'b%'? why a union?
>
> "damorgan" <dan.morgan_at_ci.seattle.wa.us> wrote in message
> news:3C5EEE15.1A17E780_at_ci.seattle.wa.us...
> > No. Try UNION or UNION ALL as in:
> >
> > SELECT *
> > FROM mytable
> > WHERE c1 LIKE 'a%'
> > UNION
> > SELECT *
> > FROM mytable
> > WHERE c1 LIKE 'b%';
> >
> > Daniel Morgan
> >
> >
> >
> >
> > Steffen Ramlow wrote:
> >
> > > c1 in('a%','b%') does not work
> > >
> > > any suggestions?
> >
Received on Tue Feb 05 2002 - 15:52:55 CST

Original text of this message

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