dbTalk Databases Forums  

Modify Delete Statement in DTS

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


Discuss Modify Delete Statement in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Modify Delete Statement in DTS - 04-01-2005 , 04:11 AM






Hi,

I have a created A DTS package using the import wizard, and I selected the
radio button so it delete's rows from the destination tbale.
I want to modify this so it only delete's rows if there are rows in the
source table (prob using an EXISTS clause)
But there is no where in the DTS designer that gives you access to the SQL
to modify the delete statment, does anyone know if there is a way to do this?

Thanks

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Modify Delete Statement in DTS - 04-01-2005 , 02:31 PM






You can open the package in the DTS designer and edit the Execute SQL Task,
which will contain the DELETE statement. However you cannot reference the
source connection in a statement running against the destination connection.
Have a look at the Data Driven Query task, and lookups, or even the DataPump
task and lookups.

Or

Load all data into a staging table and then use T-SQL to delete and insert
rows as required.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com
"Billy" <Billy (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I have a created A DTS package using the import wizard, and I selected the
radio button so it delete's rows from the destination tbale.
I want to modify this so it only delete's rows if there are rows in the
source table (prob using an EXISTS clause)
But there is no where in the DTS designer that gives you access to the SQL
to modify the delete statment, does anyone know if there is a way to do
this?

Thanks



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.