I am trying to create a select statement that will select data based on criteria that may or may not be given:
Select * from Table1
Where Column1 = TextBox1
and Column2 = TextBox2
and Column3 = TextBox3
The user however may not enter data into all TextBoxes which will result in the sql statement either failing or checking to see if that field contains "". How can I create one procedure that will select whether or not data is entered?
2007-03-06
03:59:44
·
4 answers
·
asked by
instntpudn
2
in
Computers & Internet
➔ Programming & Design
Ok that will definately work. I appreciate your help...I was hoping for the lazy mans way of possibly passing a value that SQL would interpret as "ANY" such as:
where Column1 = *
but I guess I gotta do it the long way...Alright well Thanks again for your help!
2007-03-06
04:28:39 ·
update #1