Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling search criteria in SQL

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, how can I handle a search criteria that consist of more than one fields that I may or may not populate for me to search the database? I'm trying to avoid a huge case statement.

Ex:
My Search Criteria: Column A, B, C, D
Now I may enter 1 for Column A, nothing for B, 2 and 3 for C and D respectively.

Should I create a temp table and join it into my where clause?
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top