Hierarchical structure

Поиск
Список
Период
Сортировка
От Alexander B.
Тема Hierarchical structure
Дата
Msg-id 45CCCA4E.6080703@yahoo.com.br
обсуждение исходный текст
Ответы Re: Hierarchical structure  (imad <immaad@gmail.com>)
Список pgsql-admin
Hi, I need to create a view using hierarchical structure.
Let me explain how is designed the table and what's the expected result.

TABLE:
coo_nro integer
coo_nro_father integer
level integer


DATA:
100 – null – 1
106 – null – 1
134 – 100 – 2
725 – 100 – 2
635 – 106 – 2
423 – 134 – 3
814 – 725 – 3


EXPECTED RESULT:
100 - 1
134 – 2
423 – 3
725 – 2
814 – 3
106 – 1
635 – 2
. . . so on

Basically, my result should be this way, not necessary spaces, but
sorted by hierarchic.

Is this possible on Postgres?
Could you help me?



_______________________________________________________
Yahoo! Mail - Sempre a melhor opção para você!
Experimente já e veja as novidades.
http://br.yahoo.com/mailbeta/tudonovo/



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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: database encryption
Следующее
От: imad
Дата:
Сообщение: Re: Hierarchical structure