Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-11-09 : 14:38:15
|
| Leon writes "im trying to make a search page that should have one freesearch textbox two dropdownlists with price from and to and a country listexample: I dont type anything in the freetext but in the price boxes i select from 5000 and in the other 15000 and at last i dont choose any countryso if i want to show all the records that are from 5000 to 15000 I use the BETWEEN but if I dont select a country and i want to show all the countries and the same with the freesearch, so if you dont choose the dropdownlists and leave them the have the default value of 0 and 9999999 the country has 0 so I would like to use something like IF @country = 0 THEN country <> -1 ELSE country = @countryis this possible and or is there another way of not include them in the search if they dont enter anything??Cheers" |
|
|
|
|
|