tx Orange
that example is deleting the extra records; so with slight modification it can be used for selecting just 1 out of duplicate records.
What i need is not to delete any, but when update is happening (by assigning ID to fields matching by value), not to assign the same value twice
don't see how it can work here, but perhaps i am just missing how.
i am thinking maybe it's easier, to populate, and then to delete extra record ?
so Allen Browne's suggestion led me to the following, which i think should work (will test with several duplicates)
Code:
UPDATE tblBBG SET BBG_TradeID = ""
WHERE tblBBG.[Ticket Number] = (SELECT Min(tblBBG.[Ticket Number]) AS [MinOfTicket Number]
FROM tblBBG
WHERE (((tblBBG.BBG_TradeID) In (SELECT [BBG_TradeID] FROM [tblBBG] As Tmp GROUP BY [BBG_TradeID] HAVING Count(*)>1 ) And (tblBBG.BBG_TradeID)<>"")));