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-07-18 : 00:20:17
|
| James Li writes "Hi, I try to pass in a parameter in stored procedure which it will be used in Order by phase. For example exec sp_SPname @orderByfField.The Stored Proc. is like this:create Proc as sp_SPName(@orderByField varChar(30)=null)asselect * from TBLName where id=1234 order by @orderByFieldWhen exec this proc, it give the error says it cannot use Variable in Order by. So How can I resolve this problem?Thanks." |
|
|
|
|
|