Re: SQL Syntax problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doris Bernloehr <bedo7(at)gmx(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: SQL Syntax problem
Date: 2003-09-28 16:23:25
Message-ID: 9500.1064766205@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Doris Bernloehr <bedo7(at)gmx(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Fromme 2003-09-29 11:40:59 Foreign keys and null
Previous Message Bruno LEVEQUE 2003-09-28 16:15:19 Re: SQL Syntax problem