I have a table with duplicates, and I need help writing a query or sql statement that will pull the first occurance of an ID field and all the other fields with it into a new table.
Had a play around and this seems to produce what you want in small test db using a table set up like yours:
SELECT Table1.NameID, First(Table1.FirstName) AS FirstOfFirstName, First(Table1.Surname) AS FirstOfSurname, First(Table1.RowID) AS FirstOfRowID
FROM Table1
GROUP BY Table1.NameID;
HTH Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.