[Home] [Help]
MATERIALIZED VIEW: APPS.MSC_PHUB_MFG_CAL_PERIODS_MV
Source
select p.calendar_code,
p.sr_instance_id,
p.exception_set_id,
p.period_start_date period_start_date,
p.next_date-1/86400 period_end_date,
p.next_date - p.period_start_date day_count,
to_char(p.period_start_date,fnd_profile.value('ICX_DATE_FORMAT_MASK')) || ' ' || p.period_name period_long_name ,
decode(p.period_name,
'JAN',1,
'FEB',2,
'MAR',3,
'APR',4,
'MAY',5,
'JUN',6,
'JUL',7,
'AUG',8,
'SEP',9,
'OCT',10,
'NOV',11,
'DEC',12) period_seq,
p.period_name period_name
from MSC_PERIOD_START_DATES p, msc_calendars m
where m.calendar_code = fnd_profile.value('MSC_HUB_CAL_CODE')
and m.calendar_code =p.calendar_code
and m.sr_instance_id = p.sr_instance_id