This is just a snippet of T-SQL to return the Project Name, Task Name, Task Start, and Task Finish dates for all tasks in the Project Server Reporting Database that are scheduled to start between the current SQL Server system time and the current system time plus 7 days.
The core of this is really just the use of SysDateTime and the DateAdd functions. Other than that it is a very basic query.
This gets asked for every once in a while so I will put it out here for those searching.
1: SELECT MSP_EpmProject_UserView.ProjectName, MSP_EpmTask_UserView.TaskName,
2: MSP_EpmTask_UserView.TaskStartDate,MSP_EpmTask_UserView.TaskFinishDate
3: FROM MSP_EpmProject_UserView INNER JOIN
4: MSP_EpmTask_UserView ON MSP_EpmProject_UserView.ProjectUID =
5: MSP_EpmTask_UserView.ProjectUID
6: WHERE (MSP_EpmTask_UserView.TaskStartDate > sysdatetime()) AND
7: (MSP_EpmTask_UserView.TaskStartDate < DATEADD(dd, 7, sysdatetime()))
Comments