AnsweredAssumed Answered

Query to get the daily time entries of a resource

Question asked by Manisha14 on May 19, 2016
Latest reply on May 19, 2016 by navzjoshi00

Hi,

I need to build a portlet that gives the daily time entries of a resource irrespective of the timesheet status. I have used time entry slice for this and below is my query for a resource for a particular day to get the time entries. However, this query is not giving me exact and appropriate results. Could anyone tell me where I am going wrong? is something wrong with the query or the time slice?

 

SELECT distinct r.unique_name WWID,r.full_name resource_name,prt.PRNAME,

        tp.prStart period_start_date, tp.prFinish - 1 period_end_date,ts.prStatus,s.slice_date,

      nvl(s.slice,0) hours_posted

       FROM   prTimeSheet ts ,  prTimeEntry te, prTimePeriod tp, srm_resources r, prj_resources pr, prj_blb_slices s, prj_blb_slicerequests sr, PRASSIGNMENT pra,

       PRTASK prt, inv_investments inv

       where

        ts.prID = te.prTimeSheetID

     and ts.prTimePeriodID = tp.prID

       and ts.prResourceID = r.id 

      and pr.prid = r.id

       and te.prID = s.prj_object_id

        and s.slice_request_id = sr.id

     

      and pra.PRRESOURCEID = r.ID

       and prt.PRID = pra.PRTASKID

       and inv.id = prt.prprojectid

       and (sr.request_name = 'Daily Resource Time Entries')

         and r.unique_name = 'MAG003'  and s.slice_date = '30-NOV-15'

         order by slice_date

 

Thanks ,

Manisha

Outcomes