Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a DTS Package using T-SQL

Status
Not open for further replies.

Middlej

MIS
Jan 4, 2002
4
US
Does anyone out there have any tips or ideas as to how one can execute a DTS package using Transact-SQL code? The idea is to have certain external data sets imported only if certain conditions are met. Such an example MIGHT look like (note: I've tried this, it doesn't work):

USE [Database Name]
GO

IF dbo.tablename.colname = 1
BEGIN
EXEC [packagename]
END
GO

Anyone?

Thank you
 
Check the following link on the SQLDTS website.

Execute a package from T-SQL

The IF statement will not work as coded. It should look something like the following.

IF Exists (Select * From dbo.tablename Where colname = 1) Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top