Developer forum

Forum » Feature requests » Monitoring > Health > User management > Duplicate usernames

Monitoring > Health > User management > Duplicate usernames

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

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


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Added to DW10!

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Perfect, thanks Nicolai