dbTalk Databases Forums  

Inserting New Records

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


Discuss Inserting New Records in the microsoft.public.sqlserver.dts forum.



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

Default Inserting New Records - 04-06-2004 , 02:34 PM






Hello:

I have a DTS package that moves some tables from a
production database to a reporting database. The tables
all have primary keys.

I do not want duplicate records in my destination tables
but when my DTS package runs, it just stops when it
reaches a value that already exists in my destination
tables. I would like the package to skip the duplicates
and complete.

Any ideas would be appreciated

Brennan

Reply With Quote
  #2  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Inserting New Records - 04-06-2004 , 03:08 PM






Moves some tables ? Or move new records ? Don't know you're record count ..
if it's small you could just drop the reporting table create it againg and
then
put in the total production table.

Or you could make an sql-statement which only inserts new records.

\Michael V.

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

Quote:
Hello:

I have a DTS package that moves some tables from a
production database to a reporting database. The tables
all have primary keys.

I do not want duplicate records in my destination tables
but when my DTS package runs, it just stops when it
reaches a value that already exists in my destination
tables. I would like the package to skip the duplicates
and complete.

Any ideas would be appreciated

Brennan



Reply With Quote
  #3  
Old   
Richard Hale
 
Posts: n/a

Default RE: Inserting New Records - 04-06-2004 , 04:36 PM



The most scalable solution for moving production data to a reporting database in SQL server is to make use of replication
The two kinds of replication that would benefit you here would be either snap shot or transactional replication. The decision needs to be made on your end as to how current the data needs to be for reporting.

If you decide to stick with running a dts try porting the data into a staging table and then inserted only the items which do not already exist in your reporting table [using an Insert Join]. Any questions regarding the two replication methods mentioned above can be directed to the email address attached to this post


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.