select p.*
  from sh1.tplano_contas p
     , (SELECT keyid, parent_keyid FROM connectby(sh1.tplano_contas',
'id_conta', 'conta_pai', '1', '1', 0)
      AS t(keyid text, parent_keyid text, level int, pos int)) as c
 where p.id_conta = c.keyid
   and p.conta_pai = c.parent_keyid

consegui chegar até aqui...
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a