AnsweredAssumed Answered

SQL Query for OPEN timesheets

Question asked by JoanKelley4209671 on Nov 26, 2012
Latest reply on Nov 26, 2012 by JoanKelley4209671
Hello,
does anyone have query that returns all OPEN timesheets for a certain timeperiod?

the query I have gives these results but...
only if a resource has added a task to the timesheet will it show in my query. If the resource has never touched teh timesheet it will not show in my query. Is there anyway to get around this? Or is that that the timesheet tables only get populated once teh timesheet is OPENED and an item added?

Here is the query I am using.
SELECT
distinct NIKU.SRM_RESOURCES.FULL_NAME,
NIKU.PRTIMEENTRY.PRACTSUM/3600,
--(NIKU.PRTIMEENTRY.PRACTSUM/3600) as [hours],
NIKU.PRTIMEPERIOD.PRSTART,
niku.prtimesheet.prstatus

FROM
NIKU.SRM_RESOURCES,
NIKU.PRTIMEENTRY,
NIKU.PRTIMEPERIOD,
NIKU.PRTIMESHEET

WHERE
NIKU.PRTIMESHEET.PRRESOURCEID = NIKU.SRM_RESOURCES.ID
AND NIKU.PRTIMESHEET.PRID = NIKU.PRTIMEENTRY.PRTIMESHEETID
AND NIKU.PRTIMESHEET.PRTIMEPERIODID = NIKU.PRTIMEPERIOD.PRID
and NIKU.PRTIMEPERIOD.PRSTART = '10/28/2012'
--AND NIKU.PRTIMESHEET.PRSTATUS = 0
--and NIKU.PRTIMESHEET.PRSTATUS = 2

ORDER BY NIKU.SRM_RESOURCES.FULL_NAME asc

Outcomes