From: | George Weaver <gweaver(at)shaw(dot)ca> |
---|---|
To: | KeithW(at)narrowpathinc(dot)com, PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: JOIN columns with no data |
Date: | 2004-12-21 21:23:36 |
Message-ID: | 000c01c4e7a3$57a58f90$6400a8c0@Dell4500 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Keith,
The following should give you what you're looking for
SELECT Table1.col1, Table1.col2, Table1.col3, Table2.col2
FROM Table1
LEFT JOIN Table2
WHERE Table1.col1 = Table2.col1;
etc.
George
----- Original Message -----
From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Sent: Tuesday, December 21, 2004 3:13 PM
Subject: [NOVICE] JOIN columns with no data
> Hi All,
>
> I am trying to create a fairly large join (7 tables) that needs to allow
> NULL
> in columns.
>
> Table 1
> 1 | A | 2
> 2 | B | 3
>
> JOINed with
>
> Table 2
> 1 | note
>
> should output
> 1 | A | 2 | note
> 2 | B | 3 |
>
> Kind Regards,
> Keith
>
> ______________________________________________
> 99main Internet Services http://www.99main.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jeffrey Melloy | 2004-12-21 21:55:20 | Re: How to get day of week? |
Previous Message | Keith Worthington | 2004-12-21 21:13:31 | JOIN columns with no data |