Create dynamic Where clause in Oracle SP
Hi,
I have a web page where users can search for customers by filling in a form which has the following feilds: -
Title
Firstname
Surname
Address1
Address2
Postcode
Telephone No
There is a customer table with the above columns.
The problem I have is the user can type any combination of the above fields i.e. they might type in the title and address1.
I need to create a dynamic SQL script such as
SELECT * FROM CUSTOMER
WHERE colX = varX
Can anyone suggest a solution please?
|