The following SQL query allows me to obtain customer information by querying on post code, however I would like to be able to query on all of the other fields in this query (if that makes sense. I can query on one field at a time,by changing the post code selection, however I can't get the statement to allow multiple query criteria, so I can query on all field at the same time. Help !
select CA.CUSTOMER_ID, DAN.Cust_Ord_Customer_TAB.Get_Name(CA.CUSTOMER_ID) CUSTOMER_NAME,
CA.ADDRESS,DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Phone ( Ca.customer_id,ca.address_id,sysdate ) phone_no,
DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Line(ca.customer_id,ca.address_id,DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Lines_Count(ca.customer_id,ca.address_id )) post_code,
DAN.CUST_ORD_CUSTOMER_TAB.Get_Market_Code (CA.customer_ID) MARKET from DAN.CUSTOMER_INFO_ADDRESS CA
WHERE
UPPER(DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Line(ca.customer_id,ca.address_id,DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Lines_Count(ca.customer_id,ca.address_id))) like UPPER(nvl('&POST_CODE','% '')'))
order by DAN.CUST_ORD_CUSTOMER_TAB.Get_Market_Code (CA.customer_ID),CA.CUSTOMER_ID
select CA.CUSTOMER_ID, DAN.Cust_Ord_Customer_TAB.Get_Name(CA.CUSTOMER_ID) CUSTOMER_NAME,
CA.ADDRESS,DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Phone ( Ca.customer_id,ca.address_id,sysdate ) phone_no,
DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Line(ca.customer_id,ca.address_id,DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Lines_Count(ca.customer_id,ca.address_id )) post_code,
DAN.CUST_ORD_CUSTOMER_TAB.Get_Market_Code (CA.customer_ID) MARKET from DAN.CUSTOMER_INFO_ADDRESS CA
WHERE
UPPER(DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Line(ca.customer_id,ca.address_id,DAN.CUSTOMER_INFO_ADDRESS_TAB.Get_Lines_Count(ca.customer_id,ca.address_id))) like UPPER(nvl('&POST_CODE','% '')'))
order by DAN.CUST_ORD_CUSTOMER_TAB.Get_Market_Code (CA.customer_ID),CA.CUSTOMER_ID