I am very new to SQL and need assistance. The specific issue I am encountering is with the Practitioner_ID_Numbers.ID_Number. In our database there are multiple 'document names' under the ID number. I would specifically like to get the document name 'NP'. I can get this successfully using the script below, however I additionally want results for persons are missing this document name (I want to show up as NULL). If I do not define the document name as 'NP' then I get multiple entries for an individual person and all their ID numbers. How can I revise the script below?
Select DISTINCT Practitioner.PRACT_ID, Last_Name, First_Name, Middle_Initial, Degree, Practitioner_ID_Numbers.ID_Number, FacCode
from Practitioner, Practitioner_ID_Numbers, Practitioner_Facilities
Where Practitioner.PRACT_ID = Practitioner_ID_Numbers.PRACT_ID
AND Practitioner.PRACT_ID = Practitioner_Facilities.PRACT_ID
and Practitioner_ID_Numbers.DocumentName = 'NP'