dbTalk Databases Forums  

Data Transform Task, how to delete rows in destination table

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Data Transform Task, how to delete rows in destination table in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matthew Sickler
 
Posts: n/a

Default Data Transform Task, how to delete rows in destination table - 09-08-2004 , 11:33 AM






I'm attempting to import a table from Access to Sql Server using the
Data Transform Task, however i'm unsure how to first clear the
destination table of data. I'd rather not use a Execute Sql Task
because of the number of tables involved. Is it possible to use some
feature of the Data Transform Task, or possible use ActiveX in some
way to iterate through the Data Transform Tasks in the DTS packages
and clear the data that way?

Thanks Matt

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Data Transform Task, how to delete rows in destination table - 09-08-2004 , 03:18 PM






You could certainly use the ACtive Script tasks yes

You could loop through the DestinationObjectName property of the DataPump
task and then against the connection of the destination issue the correct
statement

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Matthew Sickler" <sickmat (AT) iit (DOT) edu> wrote

Quote:
I'm attempting to import a table from Access to Sql Server using the
Data Transform Task, however i'm unsure how to first clear the
destination table of data. I'd rather not use a Execute Sql Task
because of the number of tables involved. Is it possible to use some
feature of the Data Transform Task, or possible use ActiveX in some
way to iterate through the Data Transform Tasks in the DTS packages
and clear the data that way?

Thanks Matt



Reply With Quote
  #3  
Old   
Pranay Pandya
 
Posts: n/a

Default Re: Data Transform Task, how to delete rows in destination table - 09-08-2004 , 06:34 PM



I would just use the execute sql tast.
use the
truncate table statements.
Using execute sql task would be as safe as suing ActiveX or any other thing.
sickmat (AT) iit (DOT) edu (Matthew Sickler) wrote in message news:<fe09cb3e.0409080833.543c343 (AT) posting (DOT) google.com>...
Quote:
I'm attempting to import a table from Access to Sql Server using the
Data Transform Task, however i'm unsure how to first clear the
destination table of data. I'd rather not use a Execute Sql Task
because of the number of tables involved. Is it possible to use some
feature of the Data Transform Task, or possible use ActiveX in some
way to iterate through the Data Transform Tasks in the DTS packages
and clear the data that way?

Thanks Matt

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.