I’m trying to run this:
UPDATE exp_category_posts
SET cat_id = 425
WHERE cat_id IN (179,224,377…etc.)to bulk update a set of entries to reassign them to a new category but am getting Duplicate entry ‘683-425’ for key ‘PRIMARY’.
When I look in the table I can see that there’s a row with entry_id 683 that already has a cat_id of 425 so I thought if I added AND cat_id != 425 to the query that would sort that out, but it hasn’t so not sure what’s going on.
I want to use a SQL query to do the updates rather than going through the CP because I have over a 1000 entries imported from Blogger that are assigned to single-entry categories and I want to consolidate the entries into larger, global categories.