All Forums Database
Richard34 9 posts Joined 02/14
19 Feb 2014
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

Adeel Chaudhry 773 posts Joined 04/08
19 Feb 2014

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!

-- If you are stuck at something .... consider it an opportunity to think anew.

M.Saeed Khurram 544 posts Joined 09/12
19 Feb 2014

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

Richard34 9 posts Joined 02/14
21 Feb 2014

Thanks again to you both!  
Your answer worked perfectly Khurram!

M.Saeed Khurram 544 posts Joined 09/12
22 Feb 2014

Great :)

Khurram

You must sign in to leave a comment.