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: Select this or ALL.

Re: Select this or ALL.

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 21 Nov 2003 05:22:19 -0800
Message-ID: <4b5394b2.0311210522.5867455c@posting.google.com>


"Prince Of Thieves" <thief_NOSPAM_at_hotmail.com> wrote in message news:<3%hvb.107$GB2.3843_at_nnrp1.ozemail.com.au>...
> But can it be done with one variable? How do I say "Select ALL" using the
> variable? I tried:
>
> var DivCode = "*"
>
> but that didn't work.
>
> --
>
> Julian Milano
>
>
> "Hans Forbrich" <forbrich_at_yahoo.net> wrote in message
> news:3FBD7C5A.4A12AF71_at_yahoo.net...
> > Prince Of Thieves wrote:
> > >
> > > I have the following line in my SQL:
> > >
> > > and divn.code= :DivCode
> > >
> > > DivCode normally is set to:
> > >
> > > -- var DivCode = "CORPORATE"
> > > -- var DivCode = "DAVENPORT"
> > > -- var DivCode = "LIFESTYLE"
> > > -- var DivCode = "SPORT"
> > > -- var DivCode = "VIRGIN O/WEAR"
> > > -- var DivCode = "VIRGIN U/WEAR"
> > >
> > > How can I change the line so that it either takes a value, as above, a
> > > combination of the above (maybe two or three of the above together or
> ALL of
> > > the above?
> > >
> >
> > Several variants. The easiest to understand - check out subselect, 'OR'
> > and 'IN' in the docco.

Sounds like you cannot or will not change the query. If this is the case, then you cannot do the search for all.

But if you are willing to change the query, switch that line to

     and divn.code LIKE :DivCode

Then you can search for ALL with DivCode = "%"

  HTH,
   Ed Received on Fri Nov 21 2003 - 07:22:19 CST

Original text of this message

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