Author: dieseldave | Posted on: 8/26/2009 8:30:21 AM | Views : 237

I have a customer table in my database; fname, lname, address, state, gender, etc.
The customer list is getting rather long and we would like to be able to search on partial last name, first name, state, gender. Ideally, I would like to have a series of check boxes, one for each parameter, with an associated text box where the user could enter a name or partial name and then click on OK to bring back all customers that start with 'A' in Indiana, for example. Should I use a single stored procedure and construct the WHERE clause dynamically - or would it be better to have several queries that I would use depending on the selected parameters? If the first option is the preferred one, how would that WHERE clause be written?
...

Go to the complete details ...