By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,584 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

How to find consecutive records in database

P: 62
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
Jan 1 '09 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
filter your table using WHERE clause.

use ORDER BY to sort your rows.


-- CK
Jan 2 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.