SELECT E.Name, E.GroupClass, E.NIIN
FROM Equipment E
WHERE (E.Assessor LIKE 'te%') AND (E.ArchivedBy IS NULL OR
WHERE (E.Assessor LIKE 'te%') AND
(E.ArchivedBy IS NULL OR E.ArchivedBy = '') AND
(E.ArchivedByID IS NULL OR E.ArchivedByID = 0) AND
(E.ArchivedByPosID IS NULL OR E.ArchivedByPosID = 0) AND
(E.NIIN = EPN.NIIN)
Now I also need another field called "MRN" from a table called "EquipPartNumbers".
How do i display the "MRN" field in my results??
If i do :
SELECT E.Name, E.GroupClass, E.NIIN, EPN.MRN
FROM Equipment E
WHERE (E.Assessor LIKE 'te%') AND
(E.ArchivedBy IS NULL OR E.ArchivedBy = '') AND
(E.ArchivedByID IS NULL OR E.ArchivedByID = 0) AND
(E.ArchivedByPosID IS NULL OR E.ArchivedByPosID = 0) AND
(E.NIIN = EPN.NIIN)
Now the above returns all the MRN's where the NIIN is in both the Equipment
and EquipPartNumbers tables. But what if the NIIN doesn't exist in the Parts Table??
I still want the record to exist in my results with a Null/empty entry for that MRN.
Any ideas??
kloner
FROM Equipment E
WHERE (E.Assessor LIKE 'te%') AND (E.ArchivedBy IS NULL OR
WHERE (E.Assessor LIKE 'te%') AND
(E.ArchivedBy IS NULL OR E.ArchivedBy = '') AND
(E.ArchivedByID IS NULL OR E.ArchivedByID = 0) AND
(E.ArchivedByPosID IS NULL OR E.ArchivedByPosID = 0) AND
(E.NIIN = EPN.NIIN)
Now I also need another field called "MRN" from a table called "EquipPartNumbers".
How do i display the "MRN" field in my results??
If i do :
SELECT E.Name, E.GroupClass, E.NIIN, EPN.MRN
FROM Equipment E
WHERE (E.Assessor LIKE 'te%') AND
(E.ArchivedBy IS NULL OR E.ArchivedBy = '') AND
(E.ArchivedByID IS NULL OR E.ArchivedByID = 0) AND
(E.ArchivedByPosID IS NULL OR E.ArchivedByPosID = 0) AND
(E.NIIN = EPN.NIIN)
Now the above returns all the MRN's where the NIIN is in both the Equipment
and EquipPartNumbers tables. But what if the NIIN doesn't exist in the Parts Table??
I still want the record to exist in my results with a Null/empty entry for that MRN.
Any ideas??
kloner