select distinct email from tbl_FSPro_members with (nolock) where ownerId = 14 and fsl_tablecode = 'BRO' and ( email like '%acosta.com' or email like '%corefoodservice.com' ) and loginEnabled = 1 and ( allowSuperUser = 'Y' or clientSTPAdminUser = 'Y') ---> select providerId, userAccessURL, userAccessEmailDomains, coalesce( providerName, provider ) as providerName from tbl_SSO_Providers with (nolock) where domainOwnerId = and domainOwnerType = and providerRole = 'IDENTITY' and ( nullif( userAccessURL, '' ) is not null or nullif( requestGateway, '' ) is not null ) and 1 = 1 and ssoEnabled = 'Y' select distinct email from tbl_FSPro_members with (nolock) where ownerId = 14 and fsl_tablecode = 'BRO' and ( email like '%acosta.com' or email like '%corefoodservice.com' ) and loginEnabled = 1 and ( allowSuperUser = 'Y' or clientSTPAdminUser = 'Y') --->