Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: input parameters

Re: input parameters

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 03 Apr 2001 22:54:16 -0700
Message-ID: <3ACAB708.B145F0F7@exesolutions.com>

Thanks. I assumed it wouldn't work and didn't even try. Very interesting.

Start off ignorant enough and you can learn something new each day.

Daniel A. Morgan

Mike Moore wrote:

> try:::
>
> where a.name like nvl('&name','%')
> or b.parsed_city = nvl('&city','nosuchcity')
>
> etc, you get the idea
>
> if you wanted no input on city to match any city you could have said:::
> and b.parsed_city = nvl('&city',b.parsed_city)
>
> didn't actually know if it would work, but tried it and it does!
>
> Mike
>
> Andy <andy.konopka_at_camtronics.com> wrote in message
> news:0bqy6.6230$7e6.2090560_at_homer.alpha.net...
> > I was wondering if I could perform the following SQL query but if someone
> > leaves one or more of the criteria blank eliminate it from my search by --
> > so if someone queries by state, leave the customer name and city out of
 the
> > search or if some leaves the city blank query
> > only by the name and the state given to the query -- here is the query
> > SELECT A.NAME,B.CUSTOMER_ID, B.ADDRESS_ID,
> > B.ADDRESS, B.PARSED_CITY, B.PARSED_STATE
> > FROM CUSTOMER_INFO A,
> > CUSTOMER_INFO_ADDRESS B
> > WHERE A.NAME LIKE '&NAME'
> > OR B.PARSED_CITY = '&CITY'
> > OR B.PARSED_STATE ='&STATE'
> > AND B.CUSTOMER_ID = A.CUSTOMER_ID;
> >
> >
> >
> >
  Received on Wed Apr 04 2001 - 00:54:16 CDT

Original text of this message

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