Access 03 - dupe numbers

ddw23

New member
Local time
Today, 03:33
Joined
Oct 6, 2006
Messages
3
Hi All.

I have a db table of vendors for City and County. The vendor number is 8 characters for City (78945612) and 9 for County (the 9th is a "P" - 78945612P). I need a query that will find all dupe vendor numbers (first 8 characters) regardless of the "P".

Will someone please help?? Thanks!!!
 
Something like;

SELECT First(Left([VendorNo],8)) AS [CityCode], Count(VendorNo) AS NumberOfDuplicates
FROM tbl_Vendors
GROUP BY Left([VendorNo],8)
HAVING (((Count(VendorNo))>1));
 
Last edited:

Users who are viewing this thread

Back
Top Bottom