RE: SQL Statement to change Departments
Shouldn't be too difficult. As always, back up before executing any update statements.
You could definitely do this all at once with nested select statements, but I like to do updates in segments to ensure I'm not making any mistakes as I go. So, I'd run
SELECT ID FROM Department WHERE Name LIKE '%<incorrect name>%'
to get the incorrect department id, then
SELECT ID FROM Department WHERE Name LIKE '%<correct department>%'
to get the correct department id, then
UPDATE Item SET DepartmentID = '<value from statement 2>' WHERE DepartmentID = '<value from statement 1>'
The %'s are wildcard characters to avoid having to type the department name exactly how it appears in the database, which is a pain for some of our's, but if it's a simple name or if you have multiple departments that contain the same pattern of characters, you can just use the syntax "WHERE Name = '<name>'" instead.
The leftover department can be deleted from within RMS. If you're in a headquarters environment, be sure to issue the appropriate worksheets to push the changes down to the stores. And I don't think this should effect sales data, which is indexed by Item id, not department id. Hope this helps, and let me know if you have any questions.