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 |
|
acdacd
Yak Posting Veteran
63 Posts |
Posted - 2005-08-16 : 05:51:36
|
| The query is only give out one scaler integer(just count(*))exec(@queryStr) in query analyser, it give out correct reusult in lower windowBut, Select @temp = exec(@queryStr)Error message "Incorrect syntax near the keyword 'exec'."How to get the value into @temp??be a hardworking people!! |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-08-16 : 06:00:57
|
declare @cnt intexec sp_executesql N'select @cnt=count(*) from orders', N'@cnt int output', @cnt outselect @cntGo with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|