Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: double linked list

Re: double linked list

From: Daryl Richter <drichter_at_pwrteam.com>
Date: 28 Jan 2003 15:30:12 -0500
Message-ID: <m2isw9augb.fsf@DJR-iBook.local.>


jasche_at_gmx.de (Juergen) writes:

> 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 first seller 'A' and the last
> buyer 'B'.
>
> the result should be
>
> S B
> - -
> A B
> B C
> C D
> D E
>
> Currently I fumbling around with self joins but haven't figured out
> yet.
> Any suggestions
>
> Many tanks in advance
>
> Cheers
>
> Juergen

You need to provide more information. Please post the DDL for your table link_t as well as some semantic information about what you mean by 'first seller' and 'last buyer' and what you are trying to achieve.

Given the information provided, "select S, B from link_t where B <> 'X'" returns the desired result. :)

-- 

Daryl Richter
Technical Manager, EAI Group
Exelon Power Team
http://www.exeloncorp.com/powerteam
Received on Tue Jan 28 2003 - 14:30:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US