Due to a bug in a program I've got some semi-duplicate data in my database. I'd like to merge those records (or delete duplicates).
My data looks like this:
usertable:
(userid, username, useremail)
101, joeuser, joeuser@mycompany
102, joeuser, joeuser@mycompany
datatable:
(userid, datasubmitted)
101, mysubmittedata
102, othersubmitteddata
I would like to get rid of any duplicate id's and merge any records for either id into a single userid.
When complete I'd like for the data to look like this:
usertable:
(userid, username, useremail)
101, joeuser, joeuser@mycompany
datatable:
(userid, datasubmitted)
101, mysubmittedata
101, othersubmitteddata
UPDATEandDELETEat all?