X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 06F20329D76 for ; Wed, 8 Sep 2004 01:05:32 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32667-02 for ; Wed, 8 Sep 2004 00:05:23 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 04034329D68 for ; Wed, 8 Sep 2004 01:05:26 +0100 (BST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i8805MCn032983 for ; Wed, 8 Sep 2004 00:05:22 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i87NcaLG025132 for pgsql-sql@postgresql.org; Tue, 7 Sep 2004 23:38:36 GMT From: "Thomas Wegner" X-Newsgroups: comp.databases.postgresql.sql Subject: SQL99 "with recursive" question Date: Wed, 8 Sep 2004 01:38:37 +0200 Organization: Hub.Org Networking Services Lines: 29 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.8 tagged_above=0.0 required=5.0 tests=PRIORITY_NO_NAME X-Spam-Level: X-Archive-Number: 200409/78 X-Sequence-Number: 18924 Hello, i think i am to stupid to use the "with recursive" SQL! I have a table: create table tree ( id_tree integer, parent_id integer ... ); In PostgreSQL i use the great connectby() function and in Oracle i simple use select * from tree start with id_tree = 0 connect by parent_id=prior id_tree But how must i use this with "with recursive" function? Every example i found uses two tables. I have only one! Please help me! I need this to use my oracle tables with the same speed in sybase 9.0. --------------------------------------------- Thomas Wegner Cabrio Meter - The Weather Plugin for Trillian http://trillian.wegner24.de/cabriometer