I have a problem where I have a database table with duplicate records in it.
What I want to do is change the field "searchableFoodItem" to false if it is a duplicate record.
Please note the count on some duplicates is 19 or more.
I want to always keep the first record of the duplicates set as true but every other duplicate I want as false.
Here is my query which I am using which shows the counts.
Any help would be appreciated.
Thanks in advance,
select item, carbohydrate, quantityServe, protein, fat, searchableFoodItem, count(*) as count
group by item
having count > 1