I have this query which pulls all the cases that are 14 calendar days old....I do not know how to change calendar to business days. So for example if I run the query as it is...I get all case with a date of 06/30/2008 but need the ones with a date of 06/25/2008. Posted is the query can someone help? I don't have access to write functions and I am till learning to write queries.
select
mem_id,
cme_hmp_code,
cme_date_begin
from
cme_case_management_episode,
hmp_health_mgmnt_program,
mem_member
where
cme_mem_uid = mem_uid
and hmp_code = cme_hmp_code
and hmp_system_meaning = 'CCM'
and cme_status = 'A'
and trunc(cme_date_begin) = trunc(sysdate) - 14
and not exists (select mno_uid from mno_mem_note where mno_cme_uid = cme_uid)
order by
cme_date_begin
select
mem_id,
cme_hmp_code,
cme_date_begin
from
cme_case_management_episode,
hmp_health_mgmnt_program,
mem_member
where
cme_mem_uid = mem_uid
and hmp_code = cme_hmp_code
and hmp_system_meaning = 'CCM'
and cme_status = 'A'
and trunc(cme_date_begin) = trunc(sysdate) - 14
and not exists (select mno_uid from mno_mem_note where mno_cme_uid = cme_uid)
order by
cme_date_begin