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: Impossible SQL query?

Re: Impossible SQL query?

From: <BigBoote66_at_hotmail.com>
Date: 5 Oct 2005 09:19:32 -0700
Message-ID: <1128529171.985608.213570@g47g2000cwa.googlegroups.com>


If it's any consolation, doing this logic client-side using some procedural code will likely be much faster than any SQL-based solution.  My solution involves two passes over the table, with subqueries for each End row. You can do the whole thing client-side in a single pass.  Just add every Begin you see to the end of a linked list; every time you see an End, remove the Begin from the head of the linked list - that is your begin/end pair; if there are no elements in the list, throw the end away.

-Steve Received on Wed Oct 05 2005 - 11:19:32 CDT

Original text of this message

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