SQL*Plus (MOSC)

MOSC Banner

SQL Experts - Need help identifying dates ranges when Direct Reports Exist

edited Nov 12, 2012 11:53PM in SQL*Plus (MOSC) 6 commentsAnswered
Does anyone have SQL lying around that can merge a table of dates into a reduced data set that represents a blend of the dates ? See below.

DROP TABLE dummydates_tbl;CREATE TABLE dummydates_tbl (EMPID NUMBER,MANAGERID NUMBER,STARTDATE DATE,ENDDATE DATE);INSERT INTO dummydates_tbl values (9769,1234,to_date('01-JAN-2012','DD-MON-YYYY'),to_date('30-JAN-2012','DD-MON-YYYY'));INSERT INTO dummydates_tbl values (5512,1234,to_date('25-JAN-2012','DD-MON-YYYY'),to_date('25-FEB-2012','DD-MON-YYYY'));INSERT INTO dummydates_tbl values (9769,1234,to_date('10-MAR-2012','DD-MON-YYYY'),to_date('30-JUN-2012','DD-MON-YYYY'));INSERT INTO dummydates_tbl values (8853,1234,to_date('10-MAR-2012','DD-MON-YYYY'),to_date(

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center