Nickman
Hi
Table design is:
TCustomer TProduct TReport
.Cust_ID .Cust_ID .Cust_ID
.Name
.Zip
I have to find duplicates in TCustomer. The first found Record is saved and the TProdut.Cust_ID/TReport.Cust_ID of the duplicates has to be changed to the "first found record". Then the duplicate is to be deleted.
- I cannot copy the Table (ca. 3GB, over 1 mio. records)
- Using SQL Server 7.0 or Access2000, or ASP
What I've already got (Access):
The result is:
Name Zip First ID Nr.of.Names Nr.of.Zip
Joe 88342 12345 4 4
Now I need to get the 2nd,3rd,4th,etc ID's so i can change TProduct & TReport and then delete them from TCustomer.
thx in advance
Nick
Hi
Table design is:
TCustomer TProduct TReport
.Cust_ID .Cust_ID .Cust_ID
.Name
.Zip
I have to find duplicates in TCustomer. The first found Record is saved and the TProdut.Cust_ID/TReport.Cust_ID of the duplicates has to be changed to the "first found record". Then the duplicate is to be deleted.
- I cannot copy the Table (ca. 3GB, over 1 mio. records)
- Using SQL Server 7.0 or Access2000, or ASP
What I've already got (Access):
Code:
SELECT
TCustomer.Name,
TCustomer.Zip,
First(TCustomer.Cust_ID) AS [First ID],
Count(TCustomer.Name) AS [Nr.of.Names],
Count(TCustomer.Zip) AS [Nr.of.Zips]
FROM
TCustomer
GROUP BY
TCustomer.Name,
TCustomer.Zip
HAVING
(((Count(TCustomer.Name))>1) AND ((Count(TCustomer.Zip))>1));
The result is:
Name Zip First ID Nr.of.Names Nr.of.Zip
Joe 88342 12345 4 4
Now I need to get the 2nd,3rd,4th,etc ID's so i can change TProduct & TReport and then delete them from TCustomer.
thx in advance
Nick