hierarchical order equivalent

From: "Grant Furick" <furick1(at)attglobal(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: hierarchical order equivalent
Date: 2001-03-18 23:56:17
Message-ID: 993hvg$j7v$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 categories. I want an
easy way to output the tree. Any ideas?

Thanks,
Grant

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-03-19 01:39:53 Re: What do I do with this error?
Previous Message Tom Lane 2001-03-18 20:37:41 Re: Trigger problem