Hi @cneed, looking at the actual datasets you attached, not all of the studentIDs are in both tables. You have 55 students that are in master_after2001 but not in grades. Because we are looking up (left join) the grades based on all the studentIDs in the master table, any studentID it can't find in grades will return null.
You may run this query to view the 55 rows:
PROC SQL;
CREATE TABLE studentIDs_not_in_grades_table AS
SELECT t1.studentID,
t1.birthdate,
t1.gender,
t1.schoolID,
t1.schoolname
FROM Data.master_after2001 t1
WHERE (t1.studentID NOT IN (select distinct studentID from Data.grades))
ORDER BY t1.studentID;
QUIT;
You may follow @andreas_lds' advice to add other=. to the informat.
Otherwise if you only want to keep studentIDs that exist in both tables, switch to an inner join instead of a left join.
... View more