Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Finding Gaps In Date Range

Rodney ChanFeb 26 2011 — edited Feb 27 2011
I was recently asked to help create a query at my company to search for date gaps in employment status history. My table data looks similar to this

employee_id employment_status beg_date end_date

1 Active 1990-01-01 1991-01-01
1 Leave 1991-02-01 1993-06-03
1 Active 1993-06-04 1995-02-01
1 Fired 2000-06-01 2299-12-31

So the gap im looking for would be from 1995-02-01 and 2000-06-01

Unfortunately as well, I dont have admin access to the database in order to be able to create an index, or do any fancy PL/SQL, im pretty much limited to the most basic SQL possible.

Any help appreciated!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2011
Added on Feb 26 2011
3 comments
1,264 views