Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored procedure in sql command
Message
From
24/10/2006 21:49:36
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Stored procedure in sql command
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01164247
Message ID:
01164247
Views:
52
Hi all:

Is it possible that we can execute a procedure(sp_amount) in a string format? Please see below.
declare @lerror char(50), @lcserver char(20), @lcdbname char(65), @lcsqlcmd char(1000)
select @lcserver = "[ej\jan]"
select @lcdbname = 'nsc'

select lcsqlcmd = "@lcserver.@lcdbname.dbo.sp_amount @cValue = 1, @error = @lerror output"
execute(lcsqlcmd)
however it gives me an error on it.

Hoping for your quick response. Thanks

Jan
Next
Reply
Map
View

Click here to load this message in the networking platform