Hi,
I have a User table defined by :
ExternalID int
UserID int
FirstName nvarchar (30)
...
and a UserGroup table defined by :
GroupID int
UserID int
...
In the User table, UserID is unique while multiple rows may have the same ExternalID. In that case, that means that the same user have different UserID.
My goal is to process the UserGroup and User tables so that for each ExternalID, I have to find all the related UserID, modify the User table to keep only one record for that "user", and modify the UserGroup table accordingly.
After that operation, I'll have no duplicate ExternalID in the User table.
Any idea on how to do that?
Best regards
Ayrton
I have a User table defined by :
ExternalID int
UserID int
FirstName nvarchar (30)
...
and a UserGroup table defined by :
GroupID int
UserID int
...
In the User table, UserID is unique while multiple rows may have the same ExternalID. In that case, that means that the same user have different UserID.
My goal is to process the UserGroup and User tables so that for each ExternalID, I have to find all the related UserID, modify the User table to keep only one record for that "user", and modify the UserGroup table accordingly.
After that operation, I'll have no duplicate ExternalID in the User table.
Any idea on how to do that?
Best regards
Ayrton