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 |
|
Saeed
Starting Member
39 Posts |
Posted - 2002-07-09 : 18:21:13
|
| In an stored procedure , where you form your select statementlike@myselct is a varchar andselect @myselect="insert ....."how do you execute this select.I m using "exec @myselect" but i think this is not what i should be using in a stored procedure..... |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-07-09 : 18:54:37
|
| Have you looked at exec in the bol?exec (@myselect)or (must be an nvarchar for this)exec sp_exeutesql @myselect==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
Saeed
Starting Member
39 Posts |
Posted - 2002-07-09 : 19:21:09
|
1/2 Hr ago I found the solution.exactly what you mentioned Thanksquote: Have you looked at exec in the bol?exec (@myselect)or (must be an nvarchar for this)exec sp_exeutesql @myselect==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy.
|
 |
|
|
|
|
|