Divyang,
Hope for daily time sheet entries you can use the assignment slice.we can use the daily sliceid 2- DAILYRESOURCEACTCURVE itself.The join is between the prj_object_id in slice with the prid column in prassignment table.
It will be the same.
Note:- For Indirect (Not aginst project)- That is for vacation etc the entries are not captured.
SELECT
i.name Project, i.code "Project ID", t.prname "Task",r.unique_name "Resource ID",r.full_name "Resource",
to_char(tp.prstart,'dd/mm/yy') || ' - ' || to_char(tp.prfinish-1,'dd/mm/yy') "TimePeriod",
to_char(to_date(slice_date),'Day') || ' - ' || to_char(slice_date,'dd/mm/yy') "Day", p.slice Hours
FROM
PRTASK t, PRAssignment a, prj_blb_slices p, srm_resources r, inv_investments i,
prtimesheet tst, prtimeperiod tp
WHERE
a.prtaskid=t.prid AND r.id=a.prresourceid AND p.prj_object_ID=a.prid AND t.PRPROJECTID=i.id
AND r.id=tst.prresourceid And tst.prtimeperiodid=tp.prid
AND r.unique_name ='Enter Resource Id'
AND tst.prstatus=4
AND p.slice_request_id=2
AND p.slice_date between '08-oct-12' And '12-oct-12'
AND tp.prstart between '06-oct-12' And '12-oct-12'
order by p.slice_date
If you purposely want to extract from timeentry stuff then you can create an custom timeslice as below in diagram and use it.
SELECT
r.full_name resource_name,
r.unique_name,
to_char(tp.prstart,'dd/mm/yy') || ' - ' || to_char(tp.prfinish-1,'dd/mm/yy') "TimePeriod",
to_char(to_date(slice_date),'Day') || ' - ' || to_char(slice_date,'dd/mm/yy') "Day",
Slice
FROM
prj_blb_slices s,
prj_blb_slicerequests b,
prtimeentry te,
prtimesheet ts,
prtimeperiod tp,
srm_resources r
WHERE
s.slice_request_id = b.id and
s.prj_object_id = te.prid and
te.prtimesheetid = ts.prid and
ts.prtimeperiodid = tp.prid and
ts.prresourceid = r.id AND
r.unique_name = 'Enter Resource Id' AND
s.slice_request_id='Enter Custom Slice id' and
tp.prstart between '01-oct-12' And '31-oct-12'
order by slice_date
cheers,
sundar