Select [User ID]
,[HCA Location Code]
,[HCA Lead]
,[PC Location Code]
,[Approval Administrator]
,[Time Sheet Admin_]
, Table_Name
FROM
(
Select [User ID]
,[HCA Location Code]
,[HCA Lead]
,[PC Location Code]
,[Approval Administrator]
,[Time Sheet Admin_]
,'Table1' AS Table_Name
FROM [DB].[dbo].[UAT Table1$User Setup] as Tablename1
Union ALL
Select [User ID]
,[HCA Location Code]
,[HCA Lead]
,[PC Location Code]
,[Approval Administrator]
,[Time Sheet Admin_]
,'Table2' AS Table_Name
FROM [DB].[dbo].[UAT Table2$User Setup]as Tablename1
Union ALL
Select [User ID]
,[HCA Location Code]
,[HCA Lead]
,[PC Location Code]
,[Approval Administrator]
,[Time Sheet Admin_]
,'Table3' AS Table_Name
FROM [DB].[dbo].[Table3$User Setup]as Tablename1) data
GROUP BY
[User ID]
,[HCA Location Code]
,[HCA Lead]
,[PC Location Code]
,[Approval Administrator]
,[Time Sheet Admin_]
,Table_Name
HAVING count(*)!=2