Delete table from within SSIS

Database
Enthusiast

Delete table from within SSIS

Hello everyone.  I am looking to delete all data in a permanent table in EDW from within an SSIS package.  I have an OLE DB connection to Teradata.  Do I need to create a Stored Procedure in Teradata, and call it from within the package.  Thanks

4 REPLIES
Teradata Employee

Re: Delete table from within SSIS

Its SSIS question .... you need to find a way to run SQL from your package .... and then you can simply send

DELETE <Database Name>.<Table Name> ALL;

to achieve this.

In case there is no-way .... then yes you can create an SP or a Macro to achieve this. But am sure there will be a way to send plain SQL to Database from within SSIS.

HTH!

Enthusiast

Re: Delete table from within SSIS

Hi Richard,

That is quite simple, add an SQL task to the data flow, and within SQL wizard, add connection information to Teradata, and write down the query:"DELETE <Database Name>.<Table Name> ALL;" The query will be pushed down to the Teradata, and delete will be completed.

Khurram
Enthusiast

Re: Delete table from within SSIS

Thanks again to you both!  

Your answer worked perfectly Khurram!

Enthusiast

Re: Delete table from within SSIS

Great :)

Khurram