query join issue - Mailing list pgsql-general

From Christine Penner
Subject query join issue
Date
Msg-id 19740415050200.9D651055B05FF2E5@edmwaa14.telusplanet.net
Whole thread Raw
Responses Re: query join issue
List pgsql-general
I have a query that joins 3 tables, TRAIN_MOD,TRAIN_COMP and TRAINING_COURSE,

There could be many training_course records for each of the other
tables. I want to get all records from the Train_mod and Train_comp
table even if there are no training course records available. This is
the query I'm trying and I get nothing. The data I'm trying this on
has no training_course records but does have records in the other
tables. What am I doing wrong.


SELECT *
FROM TRAIN_MOD LEFT OUTER JOIN TRAINING_COURSE ON
TRAIN_MOD.TRM_SEQ_NO=TRAINING_COURSE.TC_TRM_SEQ
LEFT OUTER JOIN TRAIN_COMP ON TRAIN_MOD.TRM_TRC_SEQ=TRAIN_COMP.TRC_SEQ_NO
where TC_PUB_ED  IS TRUE OR  TC_SEQ_NO IS NULL

Christine Penner
Ingenious Software
250-352-9495
christine@ingenioussoftware.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting FATAL: terminating connection due to administrator command
Next
From: Bill Thoen
Date:
Subject: Re: Need magic for identifieing double adresses