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-06-21 : 06:33:45
|
| saurabh writes "Dear Sir I want to put the where clause dynamically in @whereClause in Select Statemant .There is any mistake any below clause , Please Suggest.As Below Create proc uspTesting ( @WHERECLAUSE NVARCHAR(4000))ASSelect * from table where = @whereclause Please do the Needful as early as possible, i will be varr gratful . Thnxs and Regards Saurabh " |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-21 : 06:53:46
|
| [code]Create proc uspTesting (@WHERECLAUSE NVARCHAR(4000))ASExec('Select * from table where '+@WHERECLAUSE )[/code]But it is better to pass parameters and build query inside sp than combining allMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|