Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g09CviB89917 for ; Wed, 9 Jan 2002 07:57:44 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id g09CVea72183 for pgsql-sql@postgresql.org; Wed, 9 Jan 2002 07:31:40 -0500 (EST) (envelope-from news) From: "steve boyle" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: SQL Joins Date: Wed, 9 Jan 2002 11:31:10 -0000 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 42 Message-ID: References: <56893385.0201081316.25272d8c@posting.google.com> X-Complaints-To: news@hub.org X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: pgsql-sql@postgresql.org X-Archive-Number: 200201/131 X-Sequence-Number: 6219 Trace, is the second SQL in Postgres? "Trace" wrote in message news:56893385.0201081316.25272d8c@posting.google.com... > 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