pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Oracle to PostgreSQL help:  What is (+) in Oracle select?
4+ messages / 4 participants
[nested] [flat]

* Oracle to PostgreSQL help:  What is (+) in Oracle select?
@ 2001-03-16 22:57 Christopher Audley <Christopher.D.Audley@jhu.edu>
  2001-03-16 23:35 ` Re: Oracle to PostgreSQL help:  What is (+) in Oracle select? Richard Poole <richard.poole@vi.net>
  2001-03-17 00:02 ` Re: Oracle to PostgreSQL help:  What is (+) in Oracle select? Joe Conway <jconway2@home.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Christopher Audley @ 2001-03-16 22:57 UTC (permalink / raw)
  To: pgsql-sql

I'm trying to modify an application which runs on Oracle to run against 
PostgreSQL.  I'm currently stuck on a query that I can't recognize, it 
doesn't look like standard SQL.

A select is done across two tables, however when joining the foreign 
key, the right hand side of the equallity has (+) appended

SELECT o.* from one o, two t where o.key = t.key(+)

Does anyone know what this does and how I can reproduce the select in 
PostgreSQL?

Thanks
Chris




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Oracle to PostgreSQL help:  What is (+) in Oracle select?
  2001-03-16 22:57 Oracle to PostgreSQL help:  What is (+) in Oracle select? Christopher Audley <Christopher.D.Audley@jhu.edu>
@ 2001-03-16 23:35 ` Richard Poole <richard.poole@vi.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Richard Poole @ 2001-03-16 23:35 UTC (permalink / raw)
  To: Christopher Audley <Christopher.D.Audley@jhu.edu>; +Cc: pgsql-sql

On Fri, Mar 16, 2001 at 05:57:14PM -0500, Christopher Audley wrote:
> I'm trying to modify an application which runs on Oracle to run against 
> PostgreSQL.  I'm currently stuck on a query that I can't recognize, it 
> doesn't look like standard SQL.
> 
> A select is done across two tables, however when joining the foreign 
> key, the right hand side of the equallity has (+) appended
> 
> SELECT o.* from one o, two t where o.key = t.key(+)
> 
> Does anyone know what this does and how I can reproduce the select in 
> PostgreSQL?

It's an outer join. In Postgres it'd be

SELECT o.* from one left outer join two using ( key )

but it's new in 7.1 .

Richard



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Oracle to PostgreSQL help:  What is (+) in Oracle select?
  2001-03-16 22:57 Oracle to PostgreSQL help:  What is (+) in Oracle select? Christopher Audley <Christopher.D.Audley@jhu.edu>
@ 2001-03-17 00:02 ` Joe Conway <jconway2@home.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Joe Conway @ 2001-03-17 00:02 UTC (permalink / raw)
  To: Christopher Audley <Christopher.D.Audley@jhu.edu>; pgsql-sql

> A select is done across two tables, however when joining the foreign
> key, the right hand side of the equallity has (+) appended
>
> SELECT o.* from one o, two t where o.key = t.key(+)
>
> Does anyone know what this does and how I can reproduce the select in
> PostgreSQL?

Hi Chris,

The (+) in Oracle is for an outer join. See
http://www.postgresql.org/devel-corner/docs/postgres/sql-select.html , in
the join-type description, left outer join. Outer joins are only available
in PostgreSQL 7.1, which is currently in the late stages of beta testing.

Hope this helps,

Joe





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* RE: Oracle to PostgreSQL help:  What is (+) in Oracle select?
@ 2001-03-16 23:23 Michael Davis <mdavis@sevainc.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Davis @ 2001-03-16 23:23 UTC (permalink / raw)
  To: 'Christopher Audley' <Christopher.D.Audley@jhu.edu>; pgsql-sql

This is Oracle's syntax for an outer join.  Try this in PostgreSQL

SELECT o.* from one o LEFT JOIN two t ON o.key = t.key;

-----Original Message-----
From:	Christopher Audley [SMTP:Christopher.D.Audley@jhu.edu]
Sent:	Friday, March 16, 2001 3:57 PM
To:	pgsql-sql@postgresql.org
Subject:	Oracle to PostgreSQL help:  What is (+) in Oracle select?

I'm trying to modify an application which runs on Oracle to run against 
PostgreSQL.  I'm currently stuck on a query that I can't recognize, it 
doesn't look like standard SQL.

A select is done across two tables, however when joining the foreign 
key, the right hand side of the equallity has (+) appended

SELECT o.* from one o, two t where o.key = t.key(+)

Does anyone know what this does and how I can reproduce the select in 
PostgreSQL?

Thanks
Chris


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-03-17 00:02 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-16 22:57 Oracle to PostgreSQL help:  What is (+) in Oracle select? Christopher Audley <Christopher.D.Audley@jhu.edu>
2001-03-16 23:35 ` Richard Poole <richard.poole@vi.net>
2001-03-17 00:02 ` Joe Conway <jconway2@home.com>
2001-03-16 23:23 RE: Oracle to PostgreSQL help:  What is (+) in Oracle select? Michael Davis <mdavis@sevainc.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox