select SMS_R_User.ResourceId, SMS_R_User.ResourceType, SMS_R_User.Name, SMS_R_User.UniqueUserName, SMS_R_User.WindowsNTDomain from SMS_R_User
where SMS_R_User.SecurityGroupName in ("xxx\\SCCM-Tech_365","xxx\\SCCM-Tech_365_Visio-Pro")
and SMS_R_User.SecurityGroupName not in ("xxx\\SCCM-Tech_365_Project-ST","xxx\\SCCM-Tech_365_Visio-ST")
Вот так не работает
и так тоже
where SMS_R_User.SecurityGroupName = "xxx\\SCCM-Tech_365_Visio-Pro"
and SMS_R_User.SecurityGroupName != "xxx\\SCCM-Tech_365_Visio-ST"