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 |
|
marconi8
Yak Posting Veteran
73 Posts |
Posted - 2003-05-12 : 07:03:22
|
| strange, but maybe i have something dont understand but why this dont work for me ??declare @SQL NVARCHAR(1000)@SQL=''sorry i have posted more strings !!!!hm, EXECUTE SP_EXECUTESQL N'SELECT TOP @C_COUNT ID FROM TEST_A', N'@C_COUNT INT', @C_COUNT=10i'am only trying to understand what of this statement have error,for example if i'am writing thisSET @C_COUNT=10SET @SQL=' SELECT TOP '+CAST (@C_COUNT AS VARCHAR)+' ID FROM TEST_A 'EXECUTE SP_EXECUTESQL @SQLthen this works Edited by - marconi8 on 05/12/2003 07:42:33 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-05-12 : 07:13:39
|
quote: @sql=''
This is not valid sql syntax. Variables are assigned values in T-SQL by useing the SELECT or SET commands.Jay White{0} |
 |
|
|
|
|
|