I have a dropdown box that has 51 items to choose from: all 50 states plus the word "ALL". How would you form an SQL statment if the user chose ALL? For example: SELECT * FROM MYTABLE WHERE STATE = DROPDOWNLIST.SELECTEDITEM.VALUE
select * from tbl where (state = @state or @state = 'all') and ...
========================================== Cursors are useful if you don't know sql. DTS can be used in a similar way. Beer is not cold and it isn't fizzy.
How about : where (state = @state or @state = '%%') ? The thing is I want no discrimination of states if user has selected "ALL" from the dropdownlist.