- Thread starter
- #51
This works as well! Thank you!this build should fix double for thumbs
Can we use a database query to delete duplicates from the past (one-time cleanup)?
This works as well! Thank you!this build should fix double for thumbs
If, delete all duplicate entries, then it is possible, if one of them, then I don’t even know.Can we use a database query to delete duplicates from the past?
SELECT FullPath, COUNT(Category) FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1 ORDER BY FullPath;
DELETE FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);
I dont know how, but may be ...Can we delete only the second occurrence?
DELETE FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' AND Provider = 'AudioDB' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);
SELECT * FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' AND Provider = 'AudioDB' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);
I dont remember correct name fot this provider, need look to DB in Provider column for Artist thumb ...AudioDB
Delete FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' AND Provider = 'TheAudioDB' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);
I don’t see the point, I do not have such records in the database. And if they were, they do not affect anything, they only slightly increase the size of the database.In my opinion you can add it to the database maintenance tasks for other users having this issue.