Re: SQL Syntax problem - Mailing list pgsql-novice

From Tom Lane
Subject Re: SQL Syntax problem
Date
Msg-id 9500.1064766205@sss.pgh.pa.us
Whole thread Raw
In response to SQL Syntax problem  (Doris Bernloehr <bedo7@gmx.net>)
List pgsql-novice
Doris Bernloehr <bedo7@gmx.net> writes:
> I've got a problem in porting the following select statement from Oracle to
> Postgres, because of the characters after "b.bet_id" and "f.ask_id" in the
> where clause: (+)

Those are outer join markers.  The general idea is that Oracle's

    select ... from a, b where a.f1 = b.f2(+);

transforms to the SQL-standard syntax

    select ... from a left join b on (a.f1 = b.f2);

but I'm very fuzzy on the details beyond that (I'm not totally sure
whether the (+) denotes the left or right side of the join, even).
Anyway try googling for the terms "outer join" and "left join" and
you'll probably find some info on converting Oracle's notation to
standard.

BTW, I believe recent Oracle releases do accept the standard outer
join syntax, so you could consider converting over in general.

            regards, tom lane

pgsql-novice by date:

Previous
From: Doris Bernloehr
Date:
Subject: SQL Syntax problem
Next
From: Oliver Fromme
Date:
Subject: Foreign keys and null