Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Insert Into Problem

Author  Topic 

itmasterw
Yak Posting Veteran

90 Posts

Posted - 2007-08-29 : 09:29:41
Hi I have the following query:
INSERT INTO SDH_Tr_Ad_BkUp
SELECT *
FROM SDH_Tran_Ad

The problem is that when I look at the tables I have about a 1000 more records in the SDH_Tran_Ad table than in the SDH_Tr_Ad_BkUp. When I ran some compare queries (that is seeing what is in the SDH_Tr_Ad_BkUp table that is not in the SDH_Tr_Ad I found that isn't anything. Which means there is a 1000 duplicates in the SDH_Tr_Ad table.) However, the people that I am doing this for wants to know why it is not copying the dups too. They want an exact copy of the table.
How come my query above is not doing this?
Thank you

ITM

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-29 : 09:42:58
There can be an index or contrains that prohibits duplicates in the SDH_Tr_Ad_BkUp table.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

itmasterw
Yak Posting Veteran

90 Posts

Posted - 2007-08-29 : 09:56:00
Thanks I will check for that.

ITM
Go to Top of Page
   

- Advertisement -