Worked perfectlyBex wrote:
This one sets DateAdded to the first time Played, for all tracks that have plays before DateAdded:Code: Select all
UPDATE Songs SET DateAdded=(SELECT MIN(PlayDate) FROM Played WHERE Songs.ID=Played.IDSong GROUP BY IDSong) WHERE Songs.ID IN (SELECT Songs.ID FROM Songs, Played WHERE Songs.ID=Played.IDSong AND PlayDate<DateAdded)

I didn't try this one because I didn't want to remove any histories.Bex wrote:This one removes all history plays before DateAdded, for all tracks that have plays before DateAdded: (The Playcount needs to be manual adjusted afterwards.)Code: Select all
DELETE FROM Played WHERE IDPlayed IN (SELECT IDPlayed FROM Songs, Played WHERE Songs.ID=Played.IDSong AND PlayDate<DateAdded)
Let me know if they work properly!
Thanks once again.