We have many AD Groups that control folder redirection and I am wanting to report if the users are in that group to show redirected else show not redirected if they are not in that group but I am getting both results... What would I need to change to get this to show 1 or the other?
SELECT DISTINCT CASE WHEN UGN.User_Group_Name0 LIKE '%DOMAIN\Users01' THEN 'Redirected' WHEN UGN.User_Group_Name0 LIKE '%DOMAIN\Users02' THEN 'Redirected' ELSE 'NOT Redircted' END AS [Redirected] FROM dbo.v_RA_User_UserGroupName UGN INNER JOIN dbo.v_R_User US ON UGN.ResourceID = US.ResourceID WHERE US.Full_User_Name0 LIKE '%whateverusernameis%'