View Single Post

   
  #1 (permalink)  
Old 02-27-2008, 07:10 PM
exBK
 
Posts: n/a
Default assign EXEC() to a variable ?

Is it possible to capture the output of a EXEC() statement
into a variable ? I construct a dynamic sql which returns
a single value (SELECT count(*) from X) and I execute this
sql using EXEC. So is there anyway I can assign the count
(*) value to a local variable ? Or any other suggestions
for this issue ? Thanks for your time."
Reply With Quote