You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

BI Publisher SQL help

Received Response
35
Views
3
Comments

Hello Team,

i have written below sql to fetch count of time entries.

select REC.RESOURCE_ID,

count(distinct(to_char(start_time ,'yyyy-MM-dd'))) as Counter

 from HWM_TM_REC REC 

 where  

 REC.LATEST_VERSION = 'Y' 

 and REC.DELETE_FLAG IS NULL

and exists(SELECT 'X'

 FROM

  anc_per_abs_entries   apae,

  per_all_people_f    per,

  anc_absence_types_vl  abs,

  ANC_PER_ABS_PLAN_ENTRIES apad

WHERE apae.person_id = per.person_id

  AND apae.absence_type_id = abs.absence_type_id

  and per.person_id = REC.RESOURCE_ID

  and apae.person_id = apad.person_id

  and apae.PER_ABSENCE_ENTRY_ID = apad.PER_ABSENCE_ENTRY_ID

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!