Re: query join issue

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Christine Penner <chris(at)fp2(dot)ca>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: query join issue
Date: 2010-09-16 19:20:24
Message-ID: 4C926DF8.7030307@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16/09/2010 18:33, Christine Penner wrote:
> Training Course
> tc_seq_no (primary key)
> tc_trm_seq (foreign key to train_mod table)
> ... and some other title, desc etc fields
>
> train_mod
> trm_seq_no (primary key)
> trm_trc_seq (foreign key to train_comp table)
> .. and title etc fields
>
> train_comp
> trc_seq_no (primary key)
> .. and title etc fields

[snip]

>>> 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

Hi Christine,

I can't see it either, and without any data to try it on I'm really only
guessing....

Try removing the WHERE clause and see if you get any rows back.

Also, try each join separately - just two tables at a time - and see
what happens.

Hope this helps....

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christine Penner 2010-09-16 19:24:47 Re: query join issue
Previous Message Peter Hopfgartner 2010-09-16 18:36:17 Re: Getting FATAL: terminating connection due to administrator command