SELECT *
FROM tblMasterData MD, tblEventAlert EA, tblDevice D, tblEvent E
WHERE MD.eventAlertID = EA.eventAlertID
AND EA.eventAlertID = D.eventAlertID
AND D.eventAlertID = E.eventAlertID
AND E.eventAlertID > 0
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
SELECT *
FROM tblMasterData MD
LEFT JOIN tblEventAlert EA ON MD.eventAlertID = EA.eventAlertID
LEFT JOIN tblDevice D ON EA.eventAlertID = D.eventAlertID
LEFT JOIN tblEvent E ON D.eventAlertID = E.eventAlertID AND E.eventAlertID > 0
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
Glad it works. It was hard to tell which of your queries were really needed.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875