GetHierarchy

Поиск
Список
Период
Сортировка
От bhanu udaya
Тема GetHierarchy
Дата
Msg-id COL002-W114EF75CA410096085E1C2FD3FF0@phx.gbl
обсуждение исходный текст
Ответ на Re: pg_Restore  ("Kevin Grittner" <kgrittn@mail.com>)
Ответы Re: GetHierarchy  (Alban Hertroys <haramrae@gmail.com>)
Postgres DB crashing  (bhanu udaya <udayabhanu1984@hotmail.com>)
Список pgsql-general

Greetings !

I have a hierarchy table with two attributes :  Parent_ID, Child_ID with the sample data (can go upto n-level) as below:

ParentIDChildID
13
14
35
56
67


I need a query to retrieve all the n level hierarchy when a Child node_id is passed. For example; if I pass 7, then i need parent nodes as below: I want to achive this in postgres database (version 9.2) without connect by prior.

3   5
5   6
6  7

Any reply on this is great help.

Thanks and REgards
RAdha Krishna



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Duffey
Дата:
Сообщение: Re: Floating point error
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: GetHierarchy