Re: JOIN columns with no data - Mailing list pgsql-novice

From George Weaver
Subject Re: JOIN columns with no data
Date
Msg-id 000c01c4e7a3$57a58f90$6400a8c0@Dell4500
Whole thread Raw
In response to JOIN columns with no data  ("Keith Worthington" <keithw@narrowpathinc.com>)
List 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@narrowpathinc.com>
To: "PostgreSQL Novice" <pgsql-novice@postgresql.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
>



pgsql-novice by date:

Previous
From: "Keith Worthington"
Date:
Subject: JOIN columns with no data
Next
From: Jeffrey Melloy
Date:
Subject: Re: How to get day of week?