Output
Database
3
Posts
3
Posters
0
Views
1
Watching
-
If I have the following code
Exec('Select Count(*) From table')
how can I put the value of the execution into an integer type variableI honestly didn't know either, but a quick search found http://www.sqlteam.com/article/return-recordsets-from-dynamic-queries-called-by-exec[^] and http://www.sommarskog.se/dynamic_sql.html[^]. The second article looks very complete, and it looks like you might want to check out sp_executesql. Scott
-
If I have the following code
Exec('Select Count(*) From table')
how can I put the value of the execution into an integer type variable