You are viewing a single comment's thread. Return to all comments →
MS SQL
SELECT StartDateTable.Start_Date, EndDateTable.End_Date FROM ( SELECT Start_Date, ROW_NUMBER() OVER (ORDER BY Start_Date) as rowN FROM Projects WHERE Start_Date NOT IN (SELECT End_Date FROM Projects) ) AS StartDateTable JOIN ( SELECT ROW_NUMBER() OVER (ORDER BY End_Date) as rowN, End_Date FROM Projects WHERE End_Date NOT IN (SELECT Start_Date FROM Projects) ) AS EndDateTable ON StartDateTable.rowN = EndDateTable.rowN ORDER BY DATEDIFF(day, StartDateTable.Start_Date, EndDateTable.End_Date) , StartDateTable.Start_Date
Seems like cookies are disabled on this browser, please enable them to open this website
SQL Project Planning
You are viewing a single comment's thread. Return to all comments →
MS SQL