August 31, 2001 at 3:30 pm
The DTS "Execute SQL Task" allows me to enter a single SQL statement. But I need to execute multiple SQL statements, one after the other. Can "Execute SQL Task" do this?
TIA,
Bill Salkin
September 4, 2001 at 7:04 am
Yes, I've used it to execute multiple SQL statements. For instance, I have a single Execute SQL Task that truncates several database tables all within the same "task."
K. Brian Kelley
K. Brian Kelley
@kbriankelley
September 4, 2001 at 7:49 am
In addition to having the ability to run multiple sql statements, you can commit or rollback transactions.
September 4, 2001 at 6:18 pm
do this in the exec sql task object:
<statement here>
GO
<statement here>
Go
and continue as you need to for any statement you like. Always test to ensure errors are propogated as you require.
Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
September 4, 2001 at 7:28 pm
If you're running SQL 2K, make sure you have SP1 installed when doing this. I had some issues where my GO statements were bugging out.
Brian Knight
http://www.sqlservercentral.com/columnists/bknight
Brian Knight
Free SQL Server Training Webinars
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy