pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tjennette@thomasnelson.com
To: pgsql-sql@postgresql.org
Subject: SQL Joins
Date: 8 Jan 2002 13:16:28 -0800
Message-ID: <56893385.0201081316.25272d8c@posting.google.com> (raw)

Can someone please tell me what this previously-written SQL is doing? 
I don't understand how it is structured.  I'm familiar with JOINs such
as this (1 joined table per 1 ON phrase):

FROM t1
LEFT OUTER JOIN t2 ON t1.id = t2.id
LEFT OUTER JOIN t3 ON t2.name = t3.name

But the following SQL is puzzling me.  To which JOINs are the ON
phrases connected?

Any help would be appreciated!  (Feel free to re-format the physical
structure of the lines....as this is the way it came to me!)

Trace'


FROM eStoreManager.estore_dept_prod LEFT OUTER JOIN
    eStoreManager.estore_product ON 
    eStoreManager.estore_dept_prod.sku =
eStoreManager.estore_product.sku
     RIGHT OUTER JOIN
    eStoreManager.tblCProductClass 
	LEFT OUTER JOIN eStoreManager.tblCProductClassProduct ON 
    	eStoreManager.tblCProductClass.ProductClassID =
eStoreManager.tblCProductClassProduct.ProductClassID
     	ON 
    	eStoreManager.estore_product.sku =
eStoreManager.tblCProductClassProduct.sku
     	FULL OUTER JOIN
    	eStoreManager.tblCProductClassCreator INNER JOIN
    	eStoreManager.tblCCreator 
	ON eStoreManager.tblCProductClassCreator.CreatorID =
eStoreManager.tblCCreator.CreatorID
    ON eStoreManager.tblCProductClass.ProductClassID =
eStoreManager.tblCProductClassCreator.ProductClassID



view thread (3+ messages)  latest in thread

Message-ID: <56893385.0201081316.25272d8c@posting.google.com>
Permalink:  ../56893385.0201081316.25272d8c@posting.google.com/
Also on:    postgresql.org/message-id/56893385.0201081316.25272d8c@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tjennette@thomasnelson.com
  Subject: Re: SQL Joins
  In-Reply-To: <56893385.0201081316.25272d8c@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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