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 - 2005-03-04 : 08:19:22
|
Luis writes "I am building an ASP.Net page (MDE ver 7.1) with a search panel with 2 fields:- a string textbox.- a drop down list with a code(float/double) associated to each text item. Now I will have to do a search on a table using a button that passes this values to a stored procedure (in SQL Server 2000).But the problem is that the user may or may not use the fields.How can I filter an exact string or pass all of the strings in the searched table? Can't use LIKE statement, but is there a wildcard for all strings to use with the equal sign? or can I use an IF...ELSE in a SELECT statement?Very similar questions for the DOUBLE type.Can i join it all in the same stored procedure? Can I filter a recordset or stored procedure (I would have to use 2 stored procedures if I can do this)?If there isn't much to do I will have to use 4 diferent stored procedures all very similar just changing the WHERE clause. And if eventually the client wants to expand the search criterias the SQL server can become very quickly crowded with stored procedures :(Best,Luis" |
|
|
|
|