dbTalk Databases Forums  

Copying Data from 1 table to another

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


Discuss Copying Data from 1 table to another in the microsoft.public.sqlserver.dts forum.



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

Default Copying Data from 1 table to another - 08-13-2004 , 04:07 PM






I need to copy one table from one SQL server to another SQL server. I tried
and the data keeps growing appending. The source table is 13726 and the 1st
time executed the DTS package the destinaton was 13726. The scond time the
source was 13726 and the destination doubled.

Reply With Quote
  #2  
Old   
Roy Dean Leighton
 
Posts: n/a

Default Copying Data from 1 table to another - 08-13-2004 , 05:47 PM






Did you empty the destination table before the second
execution?

Quote:
-----Original Message-----
I need to copy one table from one SQL server to another
SQL server. I tried
and the data keeps growing appending. The source table is
13726 and the 1st
time executed the DTS package the destinaton was 13726.
The scond time the
source was 13726 and the destination doubled.
.


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

Default Re: Copying Data from 1 table to another - 08-14-2004 , 04:03 AM



It will do.

You are either going to have to

1. flag the source rows as having been moved already
2. Clear out the destination each time (costly if your table is large)
3. Use a linked server so your Source Query can be intelligent enough to
know what rows it needs.

The fact that your destination has doubled suggests to me that their is no
Primary Key or Unique Constraint which in itself is something you should
remedy.


--
--

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


"Lontae Jones" <LontaeJones (AT) discussions (DOT) microsoft.com> wrote

Quote:
I need to copy one table from one SQL server to another SQL server. I
tried
and the data keeps growing appending. The source table is 13726 and the
1st
time executed the DTS package the destinaton was 13726. The scond time
the
source was 13726 and the destination doubled.



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.