Re: Oracle 'connect by prior' now eaiser in 7.3?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Thomas Wegner <tomaten(at)t-online(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Oracle 'connect by prior' now eaiser in 7.3?
Date: 2003-10-14 17:45:59
Message-ID: 3F8C3657.7040907@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thomas Wegner wrote:
>>SELECT "ID_WINUSER" FROM connectby('"WINUSER"', '"ID_WINUSER"',
>>'"REF_ID_WINUSER"', 4, 0, '~') AS t("ID_WINUSER" integer)
>>
>>and get this error:
>>
>>ERROR: Query-specified return tuple not valid for Connectby: wrong number
>>of columns

Please see the documentation (README.tablefunc). You need to properly
specify the column definitions in the FROM clause, i.e. (untested):

SELECT "ID_WINUSER" FROM
connectby('"WINUSER"', '"ID_WINUSER"','"REF_ID_WINUSER"', 4, 0, '~')
AS t("ID_WINUSER" integer,
"REF_ID_WINUSER" integer,
level integer,
branch text);

HTH,

Joe

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Brusser 2003-10-14 18:05:53 How to determine the current user
Previous Message scott.marlowe 2003-10-14 17:26:45 Re: [SQL] sql performance and cache