LEFT JOIN - Mailing list pgsql-sql

From Grant Furick
Subject LEFT JOIN
Date
Msg-id 998ne9$1n0t$1@news.tht.net
Whole thread Raw
List pgsql-sql
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_namefrom((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
ONi.image_id =
 
aia.image_id)ON a.article_id = aia.article_idwhere i.image_type_id = 1and a.live_date <=  #CreateODBCDate(Now())#and
a.active_ind= TRUEand a.status_id = 2and c.category_id=#intCategoryID#
 

Thanks




pgsql-sql by date:

Previous
From: "Peter Morgan"
Date:
Subject: Toggle a Bit type ie not field
Next
From: "Ligia Pimentel"
Date:
Subject: FULL JOIN