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 |
|
supergirl_gem
Starting Member
4 Posts |
Posted - 2006-03-09 : 08:29:45
|
| Hi, I'm fairly new to Transact SQL and stored procedures, so i'm really struggling to find the solution to my problem. I have a web page with a search facility with three options2 drop down menus and a text field. The user doesn't have to select all options to continue, the two drop down menus have an all option.If the user selects all then i just want to do a select * from my database, otherwise i want to do a select * from MyDatabase where fieldName = parameter also if the other fields are selected i will need an and to so i need to check if the sql string has something in it then add and fieldType2 = parameter 2 on the end if it does have something in it otherwise where fieldName2 = parameter2 |
|
|
JoeNak
Constraint Violating Yak Guru
292 Posts |
|
|
|
|
|