dbTalk Databases Forums  

RE: SQLUpdates

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


Discuss RE: SQLUpdates in the microsoft.public.sqlserver.dts forum.



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

Default RE: SQLUpdates - 08-06-2004 , 08:27 PM






The Data Driven Query is the way to go. BOL contains detailed examples.

"Ken" wrote:

Quote:
I've used DTS Transform Data tasks (with ActiveX Sctipts) to insert records
into SQLServer database tables.

1) But, I'm not clear on the best way to apply updates to existing records.
Is there a general approach I should follow, e.g., is this something that can
only be done with a Data Driven Query?

2) What if I wanted to effect an update to A SQLServer database table by
first deleting a record and then inserting a replacement. How would I
coordinate the SQL task with a Transform Data Task?

Thanks for your help.

Ken

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

Default Re: SQLUpdates - 08-07-2004 , 03:09 AM






The Data Driven Query Task is one way to go but remember this will operate
on a Row * Row basis which in the case of large datasets is going to be
slow. You can of course do this using SET based processing.

If you can identify new, updated, deleted rows then you can simply use
INSERT, UPDATE, DELETE statements filtering on the correct criteria.

--
--

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


"Ken" <Ken (AT) discussions (DOT) microsoft.com> wrote

Quote:
The Data Driven Query is the way to go. BOL contains detailed examples.

"Ken" wrote:

I've used DTS Transform Data tasks (with ActiveX Sctipts) to insert
records
into SQLServer database tables.

1) But, I'm not clear on the best way to apply updates to existing
records.
Is there a general approach I should follow, e.g., is this something
that can
only be done with a Data Driven Query?

2) What if I wanted to effect an update to A SQLServer database table by
first deleting a record and then inserting a replacement. How would I
coordinate the SQL task with a Transform Data Task?

Thanks for your help.

Ken



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.