Re: SQL help requested - "linked list"
From: Mia <nospam_at_cox.net>
Date: Thu, 21 Aug 2003 15:52:21 -0700
Message-ID: <3F454D25.7050707_at_cox.net>
>
>
> In that case, the answer will depend on the dbms you are using. In general,
> SQL does not support recursive queries; although, many products do.
>
> I assume you cannot guarantee (nextid > id) for all rows in each table. I
> suggest you consider a solution that directly models order using ordered
> values instead of recreating physical order logically.
>
>
Received on Fri Aug 22 2003 - 00:52:21 CEST
Date: Thu, 21 Aug 2003 15:52:21 -0700
Message-ID: <3F454D25.7050707_at_cox.net>
Thanks again Bob,
I'm using Oracle.
I don't actually care about the order. I just want to get the IDs. I'm thinking I might want to know which IDs occur pervious versus which ones occur after, but that's not a requirement in my case.
-Mia
Bob Badour wrote:
> "Mia" <nospam_at_cox.net> wrote in message news:3F4540C5.4050201_at_cox.net...
>
>>Thanks Bob, >> >>In my mind I was thinking one thing but I did not state it very well. I >>want to select not just the immediate previous and next IDs, but all the >>ID's - the previous to the previous and the next of the next, and so on, >>all the way to the ends of the list.
>
>
> In that case, the answer will depend on the dbms you are using. In general,
> SQL does not support recursive queries; although, many products do.
>
> I assume you cannot guarantee (nextid > id) for all rows in each table. I
> suggest you consider a solution that directly models order using ordered
> values instead of recreating physical order logically.
>
>
Received on Fri Aug 22 2003 - 00:52:21 CEST
