Searching based on query input
From: Andy <andy.konopka_at_camtronics.com>
Date: Fri, 30 Mar 2001 09:31:41 -0600
Message-ID: <IF1x6.5954$7e6.2071698_at_homer.alpha.net>
Date: Fri, 30 Mar 2001 09:31:41 -0600
Message-ID: <IF1x6.5954$7e6.2071698_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 Fri Mar 30 2001 - 17:31:41 CEST