I need to call a script from inside another script. How do I do this? I don't know if it matters but I will be doing all of this from inside of isql.
Thanks for any help.Use the EXECUTE command
Example:
UPDATE tbl
SET col1 = col1 * 0.787
WHERE col2 = 'x'
IF @.@.ERROR <> 0
EXEC("isql -E -SMyServer -Q -iD:\MYScript\Error.sql")|||Where is my mind, you need to use master..xp_cmdshell
UPDATE tbl
SET col1 = col1 * 0.787
WHERE col2 = 'x'
IF @.@.ERROR <> 0
master..xp_cmdshell "isql -E -SMyServer -iD:\MYScript\Error.sql"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment