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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL - Combine multiple records to give 1 record

Re: SQL - Combine multiple records to give 1 record

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: Fri, 26 Aug 2005 21:53:08 +0000 (UTC)
Message-ID: <deo304$8ss$1@klatschtante.init7.net>


On 2005-08-26, premgoel_at_gmail.com <premgoel_at_gmail.com> wrote:
>
>
> I have a table
>
> person_id start_month end_month
> 1 200301 200303
> 1 200302 200303
> 1 200303 200304
> 1 200306 200308
>
>
> For the first 3 records, the end_month of the previous record is less
> than the start_month of the next record. I want to write a SQL to
> combine them and give me the following result
>
> person_id start_month end_month
> 1 200301 200304
> 1 200306 200308

What makes the first 3 records be the first three records?

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Fri Aug 26 2005 - 16:53:08 CDT

Original text of this message

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