Esta consulta permite extraer la lista de Recursos asignados a Proyectos con el detalle del Calendario del proyecto y el Calendario del Recurso.
Extrae la información de la base de datos de Reporting de Project Server, exceptuando el dato del calendario del proyecto, el cual es extraido desde la base de datos Published de Project Server:
SELECT
MSP_EpmProject_UserView.ProjectName Proyecto,
PC.CAL_Name [Calendario Proyecto],
MSP_EpmResource_UserView.ResourceName Recurso,
MSP_EpmResource_UserView.ResourceBaseCalendar [Calendario Recurso]
FROM
MSP_EpmAssignment_UserView
INNER JOIN MSP_EpmProject_UserView ON
MSP_EpmAssignment_UserView.ProjectUID =
MSP_EpmProject_UserView.ProjectUID
INNER JOIN
MSP_EpmResource_UserView ON
MSP_EpmAssignment_UserView.ResourceUID =
MSP_EpmResource_UserView.ResourceUID
INNER JOIN ProjectServer_Published.dbo.MSP_Projects PP ON
PP.PROJ_UID = MSP_EpmProject_UserView.ProjectUID
INNER JOIN ProjectServer_Published.dbo.MSP_Calendars PC ON
PC.CAL_UID = PP.CAL_UID
WHERE
MSP_EpmResource_UserView.ResourceIsActive = 1
AND MSP_EpmResource_UserView.ResourceIsGeneric = 0
GROUP BY
ProjectName,
CAL_Name,
ResourceName,
ResourceBaseCalendar
ORDER BY
ProjectName,
ResourceName
Espero les resulte útil. Hasta la próxima!
0 comentarios:
Publicar un comentario