That's the thing.
Say the criterias are
In filter,
Oldest added,
Song ID.
If A, B, C are duplicates and
A, B are IN a filter
then the next criteria should be used to futher select which to keep instead of just the first returned by the DB query.

GetFieldSQL ="'CASE WHEN tmpTrackNr ='''' THEN ''??'' WHEN LENGTH(tmpTrackNr)=1 THEN ''0''||tmpTrackNr ELSE tmpTrackNr END'"'CASE WHEN LENGTH(TrackNumber)=1 THEN ''0''||TrackNumber ELSE TrackNumber END''ltrim(TrackNumber,'0')''ltrim(DiscNumber,'0')'Users browsing this forum: No registered users and 27 guests