Hi,
Please use TOP 1 in sub query like
SELECT ReferringPhysician.LastName,ReferringPhysician.FirstName,(SELECT TOP 1 LocationName FROM RefPhysLocations WHERE ReferringPhysicianID = (SELECT TOP 1 ReferringPhysicianID FROM RefPhysLocations WHERE LocationName LIKE '%'+@keyword+'%')) AS LocationName
FROM ReferringPhysician
WHERE ReferringPhysician.ReferringPhysicianID=(SELECT ReferringPhysicianID FROM RefPhysLocations WHERE LocationName LIKE '%'+@keyword+'%'
)
Please do let me know, if you have any doubt.
Please provide "
Vote" if this would be helpful, and make "
Accept Answer" if this would be correct answer.:rose:
Thanks,
Imdadhusen