Olaf,

The left join is a notation that says to get all records from the left hand
side of the join and only those records where the criteria matches from the
right hand side.

It is btw a part of most RDBMS engines I've ever used, so it's not that
unusual a syntax.

You can also do something similar by using unions.

hth

Phil
[EMAIL PROTECTED]

----- Original Message -----
From: "Olaf Zanger" <[EMAIL PROTECTED]>
To: "Zope Mailinglist" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 9:50 AM
Subject: [Zope] ZBabel translation to Postgres


> Hi there,
>
> i'm using ZPyGreSQL successfully for my database. To keep it simple i
> don't want to use MySQL for ZBabel.
>
> ZBabel though uses some MySQL specific syntax which i am unsuccessfully
> translating to PostgreSQL syntax:
> Description "md5Hash" are the same fore entries with different "lang"
> fields. They are used to translate depending on selected language.
>
> SELECT
> Phrases.*
>
> FROM
> Phrases
>
> LEFT JOIN
> Phrases as b
>
> ON
> Phrases.md5Hash = b.md5Hash AND Phrases.lang <> b.lang
>
> WHERE
> b.md5Hash is NULL AND Phrases.lang=<dtml-sqlvar srcLang type=nb>
>
> What does the whole thing do anyway?
> How can you join "Phrases.md5Hash = b.mdf5Hash", while "md5Hash is
> NULL"?
> What is different in the LEFT JOIN ... ON ... statement to a normal
> WHERE clause?
> My try for translation to PostgreSQL (which I assume is completely
> ignorant):
>
> SELECT
> Phrases.*
>
> FROM
> Phrases as b
>
> WHERE
> Phrases.md5Hash *= b.md5Hash AND Phrases.lang <> b.lang AND
>
> b.md5Hash is NULL AND Phrases.lang=<dtml-sqlvar srcLang type=nb>
>
>
> Has anybody ported ZBabel already?
> Thanks for help
>
> Olaf
>
> --
> soli-con Engineering Zanger
> Dipl.-Ing. (FH) Olaf Marc Zanger
> Lorrainestrasse 23
> 3013 Bern / Switzerland
> Fon: +41-31-332 9782
> Mob: +41-76-572 9782
> mailto:[EMAIL PROTECTED]
> mailto:[EMAIL PROTECTED]
> http://www.soli-con.com


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to