Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get a return value from a EXEC xp_cmdshell
Message
 
 
To
19/06/2008 15:44:47
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01325535
Message ID:
01325537
Views:
16
>I'm using this line to run an EXE. Sometimes the EXE is successful, and sometimes it's not. Is there a way to get whatever was displayed in the command window after it runs? I need to take a different action afterward depending on whether it was successful or not.
>
>
>EXEC MASTER.dbo.xp_cmdshell @Merge_Script, no_output
>
EXEC @result = xp_cmdshell @Merge_Script, no_output

http://msdn.microsoft.com/en-us/library/ms175046.aspx
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform