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 |
|
cr8nk
Yak Posting Veteran
77 Posts |
Posted - 2001-11-19 : 14:00:40
|
| Hello,I am trying to set the results of a dynamic query to a local variable. Here is my code.DECLARE @strSql nvarchar(2000)DECLARE @total intSET @total = 0SET @strSql = "select count(*) from DialerLocation"EXEC sp_executesql @strSqlI would like to store the result of that query in a variable @total. Is that possible?thanks,Cr8nk |
|
|
|
|
|