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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2001-11-13 16:33:21 Re: mysql to postgres
Previous Message Ewald Geschwinde 2001-11-13 01:39:13 mysql to postgres