Hello all,
I need help with coming up with a SQL query that pulls only one value. I have a case where two providers share the exact same name. Each has a different NPI number and IdentityTypeId. I tried the below query - output is also below.
SELECT *
FROM PhysTable
WHERE ProviderName = 'DOE, JOE' AND Type = 'NPI'
UNION
SELECT *
FROM PhysTable
WHERE IdentityId = '345678'
Output

.png)





