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: (view raw, whole thread or download thread mbox)
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


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-2017 The PostgreSQL Global Development Group