Informix - Fetching Records from a table
- by Pradeep
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!!