Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored procedure in sql command
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01164247
Message ID:
01164305
Views:
11
>Thanks for the quick response however it gives me another error. Please see below:
>
>Server: Msg 170, Level 15, State 1, Line 28
>Line 28: Incorrect syntax near 'lcsqlcmd'.

You must declare the variable:
DECLARE @lcsqlcmd varchar(8000)
SET @lcsqlcmd = @lcserver + '.' + @lcdbname + '.dbo.sp_amount @cValue = 1, @error = @lerror output'
execute(@lcsqlcmd)
If you want to use OUTPUT parameters you must use sp_executesql instead of EXEC(). Check BOL topic about sp_executesql.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform