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: Mike Moore <hicamel_at_mail.home.com>
Date: Wed, 04 Apr 2001 00:43:12 GMT
Message-ID: <A6uy6.80$4L4.55534@news1.frmt1.sfba.home.com>

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 Tue Apr 03 2001 - 19:43:12 CDT

Original text of this message

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