Informix - Fetching Records from a table

Posted by Pradeep on Stack Overflow See other posts from Stack Overflow or by Pradeep
Published on 2010-05-27T11:48:24Z Indexed on 2010/05/27 11:51 UTC
Read the original article Hit count: 153

Filed under:

Consider the below table

Col1 Col2 Col3

123 ABC 20/5/2010

123 CDS 21/5/2010

123 VDS 22/5/2010

123 ABC 23/5/2010

123 VDS 24/5/2010

123 CDS 25/5/2010

123 ABC 26/5/2010

I need to fetch the first occurrence of CDS and calculate the time diff between the next row. Similarly I need to find out the next occurrence of CDS and calculate the time diff with the next row. This has to go on until there are no occurrences of CDS left in the table.

Will be grateful if someone can help on this!!

© Stack Overflow or respective owner

Related posts about informix