dbTalk Databases Forums  

Updating Records Using DTS

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


Discuss Updating Records Using DTS in the microsoft.public.sqlserver.dts forum.



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

Default Updating Records Using DTS - 12-02-2003 , 01:42 PM






I'm a newbie to DTS and I have two questions:

1. How would I go about updating existing records using
DTS? FOr example, I have two data sources, one is being
updated regularly. The other one is just a "copy" which I
am loading records from the first table into periodically.
The problem is the source table gets updates also. I need
to get those updates into the destination table.

2. Is there an issue with updating records if the table
has an Insert trigger on it? I saw a reference in another
post that said "As long as the table does not have an
insert trigger". So I was wondering what this may have
meant.

TIA

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

Default Re: Updating Records Using DTS - 12-02-2003 , 02:54 PM






OK so you have

1 Source
1 Destination

You have a variety of actions performed on the Source table (UPDATES /
INSERTS)

I personally would put an ON UPDATE TRIGGER and an ON INSERT TRIGGER into
the source table. This would capture the values I wanted and the action
type performed. You can then use the Data Driven Query task to execute the
correct query based on the type of action taken on the Source table.

Hope that makes sense

CREATE TABLE
trigSource
(
SourceID.......................................... .........,
SourceAction CHAR(1) CHECK(SourceAction IN('I','U','D'))
)



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

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

Quote:
I'm a newbie to DTS and I have two questions:

1. How would I go about updating existing records using
DTS? FOr example, I have two data sources, one is being
updated regularly. The other one is just a "copy" which I
am loading records from the first table into periodically.
The problem is the source table gets updates also. I need
to get those updates into the destination table.

2. Is there an issue with updating records if the table
has an Insert trigger on it? I saw a reference in another
post that said "As long as the table does not have an
insert trigger". So I was wondering what this may have
meant.

TIA



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.