| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL help requested - "linked list"
Lennart Jonsson wrote:
> Mia <nospam_at_cox.net> wrote in message news:<3F44E6F9.4090306_at_cox.net>...
>
>>Hi Everyone, >> >>I have a query I'm trying to do, and with my limited SQL knowledge I >>don't know how to go about it. >> >>Here's a simplified description of my challenge. I have data in a table >>that forms sets you might describe as singly-linked lists. For example, >>the table contains columns ID and NEXTID, where NEXTID points to the ID >>of some other row. The linked list ends when NEXTID has a zero value. >> >>Given one of the ID values (they're unique), I want to select the IDs >>that occur before and after in that particular linked list. In a >>differnet language I would approach this using a recursive function. Is >>this possible in SQL? >> >>-Mia
Thanks Lennart!
Thats seems to do what I want. Now, if I could just figure out HOW. Can someone help out with an Oracle equivalent?
-Mia Received on Thu Aug 21 2003 - 18:50:02 CDT
![]() |
![]() |