August 22, 2002 at 1:36 pm
As far as I know, I can't execute a SQL script from within T-SQL. I'd like to, though. Anyone know how?
Steve
Steve Miller
August 22, 2002 at 2:05 pm
what do you mean? run a filesytem .sql file from T-SQL? You can do this with isql and using xp_cmdshell.
Steve Jones
August 22, 2002 at 3:21 pm
Thanks, Steve, that's about what I needed:
EXEC master..xp_cmdshell 'osql -Smy_server -Umy_user -Pmy_password -imypath\myscript.sql -n'
The site where I found that appears to be gone, but it can still be found here:
http://vyaskn.tripod.com/programming_faq.htm
Steve
Steve Miller
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply