[AccessD] finding duplicate records based on two fields

Hale, Jim Jim.Hale at FleetPride.com
Thu Sep 15 09:33:09 CDT 2005


Never mind, I figured it out
Jim Hale

-----Original Message-----
From: Hale, Jim [mailto:Jim.Hale at fleetpride.com]
Sent: Thursday, September 15, 2005 9:28 AM
To: 'Accessd (E-mail)
Subject: [AccessD] finding duplicate records based on two fields


I have a table with fixed assets by co and dept. I need to find the
duplicates- ie records  where co and dept are the same. Using the duplicate
wizard I can construct the query to find duplicates where the dept is the
same but I can't figure out the sql to find the records where two fields are
the same. Any help will be appreciated. Below is the sql that finds dept
duplicates TIA 
Jim Hale

SELECT [Other Assets].Dept, [Other Assets].Co, [Other Assets].State, [Other
Assets].[Fixed Assets]
FROM [Other Assets]
WHERE ((([Other Assets].Dept) In (SELECT [Dept] FROM [Other Assets] As Tmp
GROUP BY [Dept] HAVING Count(*)>1 )))
ORDER BY [Other Assets].Dept;

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list