Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2LJcFt29516 for ; Wed, 21 Mar 2001 14:38:15 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2KN9mH17197 for ; Tue, 20 Mar 2001 18:09:48 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f2KN0Q956352 for pgsql-sql@postgresql.org; Tue, 20 Mar 2001 18:00:26 -0500 (EST) (envelope-from news) From: "Grant Furick" X-Newsgroups: comp.databases.postgresql.sql Subject: LEFT JOIN Date: Tue, 20 Mar 2001 18:00:08 -0500 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 21 Message-ID: <998ne9$1n0t$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: pgsql-sql@postgresql.org X-Archive-Number: 200103/421 X-Sequence-Number: 2089 I am trying to output news. An article can have an image or not sometimes. Can someone help me get this to work in Postgres? select a.article_id, a.title, a.url, a.synopsis, a.publish_date, c.parent_category_id, c.category_id, c.category_name, i.server_image_name from ((article a JOIN article_category_assoc acs ON a.article_id = acs.article_id) JOIN category c ON c.category_id = acs.category_id) LEFT OUTER JOIN (image i JOIN article_image_assoc aia ON i.image_id = aia.image_id) ON a.article_id = aia.article_id where i.image_type_id = 1 and a.live_date <= #CreateODBCDate(Now())# and a.active_ind = TRUE and a.status_id = 2 and c.category_id=#intCategoryID# Thanks