Re: [SQL] double linked list

2003-02-01 Thread --CELKO--
>> are you joe celko, guy who wrote those sql books? << Yes. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mail

Re: [SQL] double linked list

2003-02-01 Thread Ryan
are you joe celko, guy who wrote those sql books? "--CELKO--" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> The table at hand is more a kind of a collection of graphs where I > want to find all possible paths between a given starting point and a > given en

Re: [SQL] double linked list

2003-02-01 Thread Juergen
heavy stuff Celko. I would lie if I would pretend I fully understand Your answer. I'll let sink it in. However, I dont store a consistent tree structure. The table at hand is more a kind of a collection of graphs where I want to find all possible paths between a given starting point and a given en

Re: [SQL] double linked list

2003-02-01 Thread Jan Hidders
Juergen wrote: > >However, I dont store a consistent tree structure. The table at hand >is more a kind of a collection of graphs where I want to find all >possible paths between a given starting point and a given end point A collection of graphs? As you presented the problem it was simply a single

Re: [SQL] double linked list

2003-02-01 Thread --CELKO--
>> The table at hand is more a kind of a collection of graphs where I want to find all possible paths between a given starting point and a given end point. << For the reachabiity index of a general graph, you need Warshal's algorithm. Let V = number of nodes in the graph Let A[i,j] be the adjacen

Re: [SQL] double linked list

2003-01-30 Thread Christoph Haller
> > On Thursday 30 January 2003 07:10, Christoph Haller wrote: > > I've seen CELKO's reply and find it very useful. > > But I cannot find anything about > > > > > BEGIN ATOMIC > > > DECLARE rightmost_spread INTEGER; > > > > > > SET rightmost_spread > > > =3D (SELECT rgt > > > FROM Fram

Re: [SQL] double linked list

2003-01-30 Thread Alan Gutierrez
On Thursday 30 January 2003 07:10, Christoph Haller wrote: > I've seen CELKO's reply and find it very useful. > But I cannot find anything about > > > BEGIN ATOMIC > > DECLARE rightmost_spread INTEGER; > > > > SET rightmost_spread > > = (SELECT rgt > > FROM Frammis > > WHERE pa

Re: [SQL] double linked list

2003-01-30 Thread Christoph Haller
I've seen CELKO's reply and find it very useful. But I cannot find anything about > BEGIN ATOMIC > DECLARE rightmost_spread INTEGER; > > SET rightmost_spread > = (SELECT rgt > FROM Frammis > WHERE part = 'G'); > ... Is this PostgreSQL at all? Any hints welcome. Regards, Chr

Re: [SQL] double linked list

2003-01-28 Thread DA Morgan
Juergen wrote: > Hi folks!, > > I've got a table called 'link_t' containing a collection of seller - > buyer relations between two parties. > > sql> select * from link_t > > S B > - - > C X > A B > B C > C D > D E > > 5 rows selected. > > I am looking for a select statement that returns the concat

[SQL] double linked list

2003-01-28 Thread Juergen
Hi folks!, I've got a table called 'link_t' containing a collection of seller - buyer relations between two parties. sql> select * from link_t S B - - C X A B B C C D D E 5 rows selected. I am looking for a select statement that returns the concatenation of seller - buyer relations between the

Re: [SQL] double linked list

2003-01-28 Thread --CELKO--
>> I've got a table called 'link_t' containing a collection of seller - buyer relations between two parties. << That is not a real linked list, but let's ignore bad terminology. One way to do this is with cursors, but they will take time and trend to be proprietary. Anohter way is to build a tre