Hi,
In Integration projects, when a bad setup is performed, it is common to end up with duplicate usernames.
Can a check be made for it? Something like
SELECT AccessUserUsername, AccessUserShopId, COUNT(*)
FROM AccessUser
GROUP BY AccessUserUsername, AccessUserShopId
HAVING COUNT(*) > 1
Or
SELECT a.*
FROM AccessUser a
JOIN (SELECT AccessUserUsername, AccessUserShopId, COUNT(*) as 'Duplicates' FROM AccessUser GROUP BY AccessUserUsername, AccessUserShopId HAVING COUNT(*) > 1 ) b
ON a.AccessUserUsername = b.AccessUserUsername
AND a.AccessUserShopId = b.AccessUserShopId
ORDER BY a.AccessUserUsername
Best Regards,
Nuno Aguiar