Connecting Tech Pros Worldwide Forums | Help | Site Map

How to find consecutive records in database

Member
 
Join Date: Feb 2007
Posts: 53
#1: Jan 1 '09
Hello every one,

I Have table e.g

EmpID TDate Status
***************************************
1 01-01-08 AB
1 02-01-08 AB
1 03-01-08 AB
1 04-01-08 PR

2 01-01-08 PR
2 02-01-08 AB
2 03-01-08 AB
2 04-01-08 PR

*****************************************
I want to show those employees who are with status 'AB' in consecutive 3days.


Regards

Muhammad Abu Bakar
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#2: Jan 2 '09

re: How to find consecutive records in database


filter your table using WHERE clause.

use ORDER BY to sort your rows.


-- CK
Reply