[SQL] LEFT JOIN

2001-03-21 Thread Grant Furick
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 articl

[SQL] hierarchical order equivalent

2001-03-18 Thread Grant Furick
Is there an equivalent way to do this Oracle query in Postgres? Select category_id, parent_category_id, category_name FROM Category START WITH category_id = 6 CONNECT BY PRIOR category_id = parent_category_id Order by category_name I am trying to build a hierarchy of inter-related categori