Skip site navigation (1) Skip section navigation (2)

Help with Outer Joins

From: Sharon Cowling <sharon(dot)cowling(at)sslnz(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Help with Outer Joins
Date: 2001-11-13 04:44:00
Message-ID: 200111130444.fAD4i4010557@lambton.sslnz.com (view raw or flat)
Thread:
Lists: pgsql-novice
I come from an Oracle background and have noted that postgres 7.1 supports outer joins...but I'm not sure of the syntax.  Note below in the first AND clause the (+) next to k.permit_id, I need to get the nulls back as well as the value but I get an error when I use (+)

SELECT t.permit_id, t.issue_date, t.issued_by, t.location, t.purpose ||' '|| t.subpurpose as spurpose, t.date_from, t.date_to, t.permit_conditions, t.other_info, k.key_code, p.person_id, p.firstname ||' '|| p.lastname as name
FROM person p, forest_permit t, permit_key k
WHERE p.person_id = t.person_id 
AND t.permit_id = k.permit_id(+) 
AND p.lastname LIKE 'Bloggs' 
AND p.firstname LIKE 'Joe'
ORDER BY t.issue_date


Best Regards,

Sharon Cowling


Responses

pgsql-novice by date

Next:From: Josh BerkusDate: 2001-11-13 16:33:21
Subject: Re: mysql to postgres
Previous:From: Ewald GeschwindeDate: 2001-11-13 01:39:13
Subject: mysql to postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group