[SQL] Re: [INTERFACES] outer join in PostgreSql

2001-01-17 Thread Ross J. Reedstrom

On Tue, Jan 16, 2001 at 06:44:18PM +0200, Hannu Krosing wrote:
> 
> To get a feel you could use MS Access visual query builder and then view
> the source.
> I have not checked it lately, but it very likely produces SQL92
> compliant outer joins.
> 

I fired up MS-Access 97SR1, just to see, and here's one result:

SELECT Institution.InstitutionName, InstituteAssignment.PersonID FROM
Institution LEFT JOIN InstituteAssignment ON Institution.InstID =
InstituteAssignment.InstID;

I'm surprised: looks pretty standard, to me.

Ross
-- 
Open source code is like a natural resource, it's the result of providing
food and sunshine to programmers, and then staying out of their way.
[...] [It] is not going away because it has utility for both the developers 
and users independent of economic motivations.  Jim Flynn, Sunnyvale, Calif.




[SQL] Re: [INTERFACES] outer join in PostgreSql

2001-01-17 Thread Hannu Krosing

Thomas Lockhart wrote:
> 
> Mauricio Hipp Werner wrote:
> >
> > I need help, which is the symbol used in postgreSql to carry out the outer
> > join.
> >
> >  in oracle the is used (+)
> > in sybase the is used * and
> > in postgreSql?
> 
> The PostgreSQL outer join is accomplished using SQL92 syntax. You will
> not find real outer joins *except* in the current beta release, and
> beware that there may be some tweaks to the grammar to help with
> conformance to the standard.
> 
> In any case, check the standard or try something like "select * from t1
> left outer join t2 on (i)".

To get a feel you could use MS Access visual query builder and then view
the source.
I have not checked it lately, but it very likely produces SQL92
compliant outer joins.

---
Hannu



[SQL] Re: [INTERFACES] outer join in PostgreSql

2001-01-16 Thread Patrick Welche

On Mon, Jan 15, 2001 at 06:16:00PM -0400, Mauricio Hipp Werner wrote:
> I need help, which is the symbol used in postgreSql to carry out the outer
> join.
> 
>  in oracle the is used (+)
> in sybase the is used * and
> in postgreSql?

I don't really understand your question, but from src/test/regress/sql/join.sql
some examples of use are:

--
-- Outer joins
-- Note that OUTER is a noise word
--

SELECT '' AS "xxx", *
  FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i);

SELECT '' AS "xxx", *
  FROM J1_TBL LEFT JOIN J2_TBL USING (i);

SELECT '' AS "xxx", *
  FROM J1_TBL RIGHT OUTER JOIN J2_TBL USING (i);

SELECT '' AS "xxx", *
  FROM J1_TBL RIGHT JOIN J2_TBL USING (i);

SELECT '' AS "xxx", *
  FROM J1_TBL FULL OUTER JOIN J2_TBL USING (i);

SELECT '' AS "xxx", *
  FROM J1_TBL FULL JOIN J2_TBL USING (i);

SELECT '' AS "xxx", *
  FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (k = 1);

SELECT '' AS "xxx", *
  FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (i = 1);


Cheers,

Patrick



[SQL] Re: [INTERFACES] outer join in PostgreSql

2001-01-16 Thread Thomas Lockhart

Mauricio Hipp Werner wrote:
> 
> I need help, which is the symbol used in postgreSql to carry out the outer
> join.
> 
>  in oracle the is used (+)
> in sybase the is used * and
> in postgreSql?

The PostgreSQL outer join is accomplished using SQL92 syntax. You will
not find real outer joins *except* in the current beta release, and
beware that there may be some tweaks to the grammar to help with
conformance to the standard.

In any case, check the standard or try something like "select * from t1
left outer join t2 on (i)".



[SQL] Re: [INTERFACES] outer join in PostgreSql

2001-01-15 Thread Peter Eisentraut

Mauricio Hipp Werner writes:

> I need help, which is the symbol used in postgreSql to carry out the outer
> join.
>
>  in oracle the is used (+)
> in sybase the is used * and
> in postgreSql?

No symbol, just words.

http://www.postgresql.org/devel-corner/docs/postgres/sql-select.htm

-- 
Peter Eisentraut  [EMAIL PROTECTED]   http://yi.org/peter-e/