DBA Data[Home] [Help]

APPS.BSC_DBI_CALENDAR SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 26

  open cv for 'select count(1) from bis_dimensions where short_name=:1' using p_dim;
Line: 42

  l_stmt := 'select 1 from bis_levels lvl, bis_dimensions dim where lvl.dimension_id=dim.dimension_id and dim.short_name =:1 and lvl.short_name=:2';
Line: 140

      delete_dbi_calendar_metadata;
Line: 303

select to_date(calendar_year||'/'||calendar_month||'/'||calendar_day,'YYYY/MM/DD'),week52,year from bsc_db_calendar where calendar_id=p_calendar
order by calendar_year desc,calendar_month desc,calendar_day desc;
Line: 371

      update_dbi_445_ent_week(l_prev_fii_week,l_prev_week,l_prev_year);
Line: 377

          update_dbi_445_ent_week(l_prev_fii_week,l_prev_week,l_prev_year);
Line: 391

    update_dbi_445_ent_week(l_prev_fii_week,l_prev_week,l_prev_year);
Line: 396

      write_to_log_file_n('select to_date(calendar_year,calendar_month,calendar_day,week52,year from bsc_db_calendar where calendar_id=p_calendar
      order by calendar_year desc,calendar_month desc,calendar_day desc using '||g_ent_cal_id);
Line: 405

    l_stmt:='select week_id from fii_time_week where week_id in (select week_id from fii_time_day where report_date=:1)';
Line: 431

      update_dbi_445_ent_week(l_prev_fii_week,l_prev_week,l_prev_year);
Line: 452

      update_dbi_445_ent_week(l_prev_fii_week,l_prev_week,l_prev_year);
Line: 470

        insert into fii_time_week ...
        name,
        ...)
       values
       (...
       to_char(l_week_end,'dd-Mon-rr'),
       );
Line: 512

procedure update_dbi_445_ent_week(
p_prev_fii_week varchar2,
p_prev_week number,
p_prev_year number) is
Begin
  --if g_debug then
    --write_to_log_file_n('In update_dbi_445_ent_week '||p_prev_fii_week||' '||p_prev_week);
Line: 529

  write_to_log_file_n('Error in update_dbi_445_ent_week '||sqlerrm||get_time);
Line: 555

/*cursor c1 is select 1 from bsc_db_calendar,bsc_sys_calendars_b where edw_calendar_type_id=1 and edw_calendar_id =1001
and bsc_db_calendar.calendar_id=bsc_sys_calendars_b.calendar_id and rownum=1;
Line: 557

cursor c2 is select 1 from mlog$_fii_time_day where rownum=1;
Line: 558

cursor c3 is select 1 from mlog$_fii_time_day where dmltype$$ <>'I' and rownum=1;
Line: 569

  l_stmt:='select 1 from bsc_db_calendar,bsc_sys_calendars_b where edw_calendar_type_id=1 and edw_calendar_id =1001
  and bsc_db_calendar.calendar_id=bsc_sys_calendars_b.calendar_id and rownum=1';
Line: 601

  l_stmt:='select 1 from mlog$_fii_time_day where rownum=1';
Line: 615

  l_stmt:='select 1 from mlog$_fii_time_day where dmltype$$ <>''I'' and rownum=1';
Line: 624

      write_to_log_file_n('Only insert rows. Inc change');
Line: 670

  delete bsc_sys_periods where periodicity_id in bsc_sys_periodicities, it did not clean bsc_sys_periods and so there was unique
  constraint error. soln-> first delete bsc_sys_periods and db calendar (delete_dbi_calendars), then periodicities and sys calendar */
  delete_dbi_calendars;
Line: 673

  delete_dbi_calendar_metadata;
Line: 757

  l_stmt := 'select max(ent_year_id), min(ent_year_id), to_number(to_char(sysdate,''YYYY'')) from fii_time_day';
Line: 785

cursor c1(p_cal_id number) is select bsc_sys_periodicities.calendar_id,
bsc_sys_periodicities.periodicity_id,bsc_sys_periodicities.period_type_id ,
bsc_sys_calendars_b.short_name, bsc_sys_periodicities.short_name,bsc_sys_calendars_b.fiscal_change
from bsc_sys_periodicities ,bsc_sys_calendars_b
where bsc_sys_periodicities.calendar_id=bsc_sys_calendars_b.calendar_id
and bsc_sys_calendars_b.edw_calendar_type_id=1 and bsc_sys_calendars_b.edw_calendar_id=p_cal_id;
Line: 801

    write_to_log_file_n('select bsc_sys_periodicities.periodicity_id,bsc_sys_periodicities.period_type_id '||
    'from bsc_sys_periodicities ,bsc_sys_calendars_b '||
    'where bsc_sys_periodicities.calendar_id=bsc_sys_calendars_b.calendar_id '||
    'and bsc_sys_calendars_b.edw_calendar_type_id=1 and bsc_sys_calendars_b.edw_calendar_id=1001/1002/1003 ');
Line: 941

  l_stmt:='select report_date,to_char(report_date,''DD''),to_char(report_date,''MM''),to_char(report_date,''YYYY''),
  month_id,ent_period_id,week_id, start_date, end_date from fii_time_day order by report_date';
Line: 986

  l_stmt:='select report_date,to_char(report_date,''DD''),to_char(report_date,''MM''),to_char(report_date,''YYYY''),
  ent_period_id,week_id from mlog$_fii_time_day
  where not exists (select 1 from bsc_sys_periods where
  periodicity_id=:1 and time_fk=to_char(report_date,''MM/DD/YYYY''))
  order by report_date';
Line: 1037

  l_stmt:='select ent_period_id,ent_year_id,sequence,name, start_date, end_date from FII_TIME_ENT_PERIOD order by ent_period_id';
Line: 1059

  l_stmt:='select ent_qtr_id,ent_year_id,sequence,name, start_date, end_date from FII_TIME_ENT_QTR order by ent_qtr_id';
Line: 1081

  l_stmt:='select ent_year_id,sequence,name, start_date, end_date from FII_TIME_ENT_YEAR order by ent_year_id';
Line: 1119

  l_stmt:='select ent_period_id,ent_year_id,sequence,name,start_date, end_date from FII_TIME_ENT_PERIOD
  where ent_period_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by ent_period_id';
Line: 1143

  l_stmt:='select ent_qtr_id,ent_year_id,sequence,name, start_date, end_date from FII_TIME_ENT_QTR
  where ent_qtr_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by ent_qtr_id';
Line: 1167

  l_stmt:='select ent_year_id,sequence,name, start_date, end_date from FII_TIME_ENT_YEAR
  where ent_year_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by ent_year_id';
Line: 1208

  l_stmt:='select week_id,substr(week_id,1,4),substr(week_id,1,4),sequence,name, start_date, end_date from FII_TIME_WEEK order by week_id';
Line: 1231

  l_stmt:='select period445_id,year445_id,sequence,name, start_date, end_date from fii_time_p445 order by period445_id';
Line: 1253

  l_stmt:='select year445_id col1,year445_id col2,name, start_date, end_date from fii_time_year445 order by year445_id';
Line: 1291

  l_stmt:='select week_id,substr(week_id,1,4),substr(week_id,1,4),sequence,name, start_date, end_date from FII_TIME_WEEK
  where week_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by week_id';
Line: 1316

  l_stmt:='select period445_id,year445_id,sequence,name, start_date, end_date from fii_time_p445
  where period445_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by period445_id';
Line: 1340

  l_stmt:='select year445_id col1,year445_id col2,name, start_date, end_date from fii_time_year445
  where year445_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by year445_id';
Line: 1370

/*cursor c1 is select month_id,substr(month_id,1,4),substr(month_id,6),name from FII_TIME_MONTH order by month_id;
Line: 1371

cursor c2 is select quarter_id,year_id,substr(quarter_id,5),name from fii_time_qtr order by quarter_id;
Line: 1372

cursor c3 is select year_id col1,year_id col2,name from fii_time_year order by year_id;*/
Line: 1383

  l_stmt:='select month_id,substr(month_id,1,4),substr(month_id,6),name, start_date, end_date from FII_TIME_MONTH order by month_id';
Line: 1405

  l_stmt:='select quarter_id,year_id,substr(quarter_id,5),name, start_date, end_date from fii_time_qtr order by quarter_id';
Line: 1427

  l_stmt:='select year_id col1,year_id col2,name, start_date, end_date from fii_time_year order by year_id';
Line: 1455

/*cursor c1 is select month_id,substr(month_id,1,4),substr(month_id,6),name from FII_TIME_MONTH
where month_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=g_greg_period_per_id)
order by month_id;
Line: 1458

cursor c2 is select quarter_id,year_id,substr(quarter_id,5),name from fii_time_qtr
where quarter_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=g_greg_qtr_per_id)
order by quarter_id;
Line: 1461

cursor c3 is select year_id col1,year_id col2,name from fii_time_year
where year_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=g_greg_year_per_id)
order by year_id;*/
Line: 1474

  l_stmt:='select month_id,substr(month_id,1,4),substr(month_id,6),name, start_date, end_date from FII_TIME_MONTH
  where month_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by month_id';
Line: 1498

  l_stmt:='select quarter_id,year_id,substr(quarter_id,5),name, start_date, end_date from fii_time_qtr
  where quarter_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by quarter_id';
Line: 1522

  l_stmt:='select year_id col1,year_id col2,name, start_date, end_date from fii_time_year
  where year_id not in (select to_number(time_fk) from bsc_sys_periods where periodicity_id=:1)
  order by year_id';
Line: 1588

  insert into bsc_sys_calendars_b(CALENDAR_ID,EDW_FLAG,EDW_CALENDAR_ID,EDW_CALENDAR_TYPE_ID,
  FISCAL_YEAR,FISCAL_CHANGE,RANGE_YR_MOD,CURRENT_YEAR,START_MONTH,START_DAY,CREATED_BY,CREATION_DATE,
  LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN, short_name) values (
  g_ent_cal_id,0,1001,1,g_bsc_greg_fiscal_year,g_ent_fiscal_change,0,l_ent_current_year,
  l_ent_start_month,l_ent_start_day,g_who,sysdate,g_who,sysdate,g_who, 'TIME');
Line: 1602

    insert into bsc_sys_calendars_tl(CALENDAR_ID,LANGUAGE,SOURCE_LANG,NAME,HELP,
    CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_ent_cal_id,g_lang(i),l_source_lang,l_cal_name,l_cal_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1614

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_ent_day_per_id,365,null,0,'PERIOD',null,0,0,g_ent_cal_id,0,1,'DAY365',9,1,1,l_xtd_pattern, 'FII_TIME_DAY');
Line: 1625

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_ent_day_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1635

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_ent_week_per_id,52,g_ent_day_per_id,0,'PERIOD',null,0,0,g_ent_cal_id,0,2,'WEEK52',7,16,16,l_xtd_pattern, 'FII_TIME_WEEK');
Line: 1646

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_ent_week_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1656

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_ent_period_per_id,12,g_ent_day_per_id,0,'PERIOD',null,0,0,g_ent_cal_id,0,2,'MONTH',5,32,32,l_xtd_pattern, 'FII_TIME_ENT_PERIOD');
Line: 1667

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_ent_period_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1676

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_ent_qtr_per_id,4,g_ent_period_per_id,0,'PERIOD',null,0,0,g_ent_cal_id,0,2,'QUARTER',3,64,64,l_xtd_pattern, 'FII_TIME_ENT_QTR');
Line: 1687

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_ent_qtr_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1696

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_ent_year_per_id,1,g_ent_qtr_per_id,0,'PERIOD',null,1,0,g_ent_cal_id,0,2,'YEAR',1,128,128,l_xtd_pattern, 'FII_TIME_ENT_YEAR');
Line: 1707

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_ent_year_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1775

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_ent_day_per_id,l_year,l_day, g_dbi_cal_record(i).start_date, g_dbi_cal_record(i).end_date, null,null,g_who,sysdate,g_who,sysdate,g_who,
    g_dbi_cal_record(i).cal_month||'/'||g_dbi_cal_record(i).cal_day||'/'||g_dbi_cal_record(i).cal_year);
Line: 1780

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(l_year,g_ent_day_per_id,l_day,1,g_lang(j),g_src_lang,g_dbi_cal_record(i).report_date,null);
Line: 1785

    insert into bsc_db_calendar(CALENDAR_YEAR,CALENDAR_MONTH,CALENDAR_DAY,YEAR,SEMESTER,
    QUARTER,BIMESTER,MONTH,WEEK52,WEEK4,DAY365,DAY30,HOLYDAY_FLAG,WORKDAY_FLAG,CALENDAR_ID)
    values(g_dbi_cal_record(i).cal_year,g_dbi_cal_record(i).cal_month,g_dbi_cal_record(i).cal_day,
    l_year,0,l_qtr,0,l_period,l_week,0,l_day,0,null,null,g_ent_cal_id);
Line: 1799

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_ent_week_per_id,g_dbi_445_week(i).ent_year_id,g_dbi_445_week(i).ent_week_id, g_dbi_445_week(i).start_date, g_dbi_445_week(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_445_week(i).week_id);
Line: 1806

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_445_week(i).ent_year_id,g_ent_week_per_id,g_dbi_445_week(i).ent_week_id,1,g_lang(j),
      g_src_lang,g_dbi_445_week(i).name,null);
Line: 1815

      insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
      END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
      values(g_ent_week_per_id,g_ent_week(i).ent_year_id,g_ent_week(i).ent_week_id, g_ent_week(i).start_date, g_ent_week(i).end_date, null,null,
      g_who,sysdate,g_who,sysdate,g_who,g_ent_week(i).week_id);
Line: 1820

        insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
        values(g_ent_week(i).ent_year_id,g_ent_week_per_id,g_ent_week(i).ent_week_id,1,g_lang(j),
        g_src_lang,g_ent_week(i).name,null);
Line: 1830

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_ent_period_per_id,g_dbi_ent_period(i).ent_year_id,g_dbi_ent_period(i).sequence,
    g_dbi_ent_period(i).start_date, g_dbi_ent_period(i).end_date,null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_ent_period(i).ent_period_id);
Line: 1836

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_ent_period(i).ent_year_id,g_ent_period_per_id,g_dbi_ent_period(i).sequence,1,
      g_lang(j),g_src_lang,g_dbi_ent_period(i).name,null);
Line: 1844

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_ent_qtr_per_id,g_dbi_ent_qtr(i).ent_year_id,g_dbi_ent_qtr(i).sequence, g_dbi_ent_qtr(i).start_date, g_dbi_ent_qtr(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_ent_qtr(i).ent_qtr_id);
Line: 1849

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_ent_qtr(i).ent_year_id,g_ent_qtr_per_id,g_dbi_ent_qtr(i).sequence,1,
      g_lang(j),g_src_lang,g_dbi_ent_qtr(i).name,null);
Line: 1857

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_ent_year_per_id,g_dbi_ent_year(i).sequence,g_dbi_ent_year(i).sequence, g_dbi_ent_year(i).start_date, g_dbi_ent_year(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_ent_year(i).ent_year_id);
Line: 1862

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_ent_year(i).sequence,g_ent_year_per_id,g_dbi_ent_year(i).sequence,1,
      g_lang(j),g_src_lang,g_dbi_ent_year(i).name,null);
Line: 1957

  insert into bsc_sys_calendars_b(CALENDAR_ID,EDW_FLAG,EDW_CALENDAR_ID,EDW_CALENDAR_TYPE_ID,
  FISCAL_YEAR,FISCAL_CHANGE,RANGE_YR_MOD,CURRENT_YEAR,START_MONTH,START_DAY,CREATED_BY,CREATION_DATE,
  LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN, SHORT_NAME) values (
  g_445_cal_id,0,1002,1,g_bsc_greg_fiscal_year,g_445_fiscal_change,0,l_445_current_year,
  l_445_start_month,l_445_start_day,g_who,sysdate,g_who,sysdate,g_who, g_445_cal_short_name);
Line: 1971

    insert into bsc_sys_calendars_tl(CALENDAR_ID,LANGUAGE,SOURCE_LANG,NAME,HELP,
    CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_445_cal_id,g_lang(i),l_source_lang,l_cal_name,l_cal_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 1982

  /* INSERT 445 DAY PERIODICITY */

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_445_day_per_id,365,null,0,'PERIOD',null,0,0,g_445_cal_id,0,1,'CUSTOM_1',9,1,1,l_xtd_pattern, g_445_day_short_name);
Line: 1995

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_445_day_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2003

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_445_week_per_id,52,g_445_day_per_id,0,'PERIOD',null,0,0,g_445_cal_id,0,2,'CUSTOM_2',0,16,16,l_xtd_pattern, g_445_week_short_name);
Line: 2014

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_445_week_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2022

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_445_p445_per_id,12,g_445_week_per_id,0,'PERIOD',null,0,0,g_445_cal_id,0,2,'CUSTOM_3',0,32,32,l_xtd_pattern, g_445_p445_short_name);
Line: 2033

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_445_p445_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2041

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_445_year_per_id,1,g_445_p445_per_id,0,'PERIOD',null,1,0,g_445_cal_id,0,2,'YEAR',1,128,128,l_xtd_pattern, g_445_year_short_name);
Line: 2051

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_445_year_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2095

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_445_day_per_id,l_year,l_day, g_dbi_cal_record(i).start_date, g_dbi_cal_record(i).end_date, null,null,g_who,sysdate,g_who,sysdate,g_who,
    g_dbi_cal_record(i).cal_month||'/'||g_dbi_cal_record(i).cal_day||'/'||g_dbi_cal_record(i).cal_year);
Line: 2100

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(l_year,g_445_day_per_id,l_day,1,g_lang(j),g_src_lang,g_dbi_cal_record(i).report_date,null);
Line: 2105

    insert into bsc_db_calendar(CALENDAR_YEAR,CALENDAR_MONTH,CALENDAR_DAY,YEAR,SEMESTER,
    QUARTER,BIMESTER,MONTH,WEEK52,WEEK4,DAY365,DAY30,HOLYDAY_FLAG,WORKDAY_FLAG,CALENDAR_ID,
    CUSTOM_1,CUSTOM_2,CUSTOM_3)
    values(g_dbi_cal_record(i).cal_year,g_dbi_cal_record(i).cal_month,g_dbi_cal_record(i).cal_day,
    l_year,0,0,0,0,0,0,0,0,null,null,g_445_cal_id,l_day,l_week,l_p445);
Line: 2117

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_445_week_per_id,g_dbi_445_week(i).year_id,g_dbi_445_week(i).sequence, g_dbi_445_week(i).start_date, g_dbi_445_week(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_445_week(i).week_id);
Line: 2122

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_445_week(i).year_id,g_445_week_per_id,g_dbi_445_week(i).sequence,1,g_lang(j),g_src_lang,
      g_dbi_445_week(i).name,null);
Line: 2130

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_445_p445_per_id,g_dbi_445_p445(i).year445_id,g_dbi_445_p445(i).sequence, g_dbi_445_p445(i).start_date, g_dbi_445_p445(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_445_p445(i).period445_id);
Line: 2135

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_445_p445(i).year445_id,g_445_p445_per_id,g_dbi_445_p445(i).sequence,1,g_lang(j),g_src_lang,
      g_dbi_445_p445(i).name,null);
Line: 2143

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_445_year_per_id,g_dbi_445_year(i).sequence,g_dbi_445_year(i).sequence, g_dbi_445_year(i).start_date, g_dbi_445_year(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_445_year(i).year445_id);
Line: 2148

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_445_year(i).sequence,g_445_year_per_id,g_dbi_445_year(i).sequence,1,g_lang(j),g_src_lang,
      g_dbi_445_year(i).name,null);
Line: 2246

  insert into bsc_sys_calendars_b(CALENDAR_ID,EDW_FLAG,EDW_CALENDAR_ID,EDW_CALENDAR_TYPE_ID,
  FISCAL_YEAR,FISCAL_CHANGE,RANGE_YR_MOD,CURRENT_YEAR,START_MONTH,START_DAY,CREATED_BY,CREATION_DATE,
  LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN, SHORT_NAME) values (
  g_greg_cal_id,0,1003,1,g_bsc_greg_fiscal_year,g_greg_fiscal_change,0,l_greg_current_year,
  l_greg_start_month,l_greg_start_day,g_who,sysdate,g_who,sysdate,g_who, g_greg_cal_short_name);
Line: 2260

    insert into bsc_sys_calendars_tl(CALENDAR_ID,LANGUAGE,SOURCE_LANG,NAME,HELP,
    CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_greg_cal_id,g_lang(i),l_source_lang,l_cal_name,l_cal_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2271

  /* INSERT GREGORIAN DAY PERIODICITY */

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_greg_day_per_id,365,null,0,'PERIOD',null,0,0,g_greg_cal_id,0,1,'CUSTOM_1',9,1,1,l_xtd_pattern, g_greg_day_short_name);
Line: 2284

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_greg_day_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2292

  /* INSERT GREGORIAN MONTH PERIODICITY */

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_greg_period_per_id,12,g_greg_day_per_id,0,'PERIOD',null,0,0,g_greg_cal_id,0,2,'CUSTOM_2',0,32,32,l_xtd_pattern, g_greg_period_short_name);
Line: 2305

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_greg_period_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2313

  /* INSERT GREGORIAN QUARTER PERIODICITY */

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_greg_qtr_per_id,4,g_greg_period_per_id,0,'PERIOD',null,0,0,g_greg_cal_id,0,2,'CUSTOM_3',0,64,64,l_xtd_pattern, g_greg_qtr_short_name);
Line: 2326

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_greg_qtr_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2334

  /* INSERT GREGORIAN YEAR PERIODICITY */

  insert into bsc_sys_periodicities(PERIODICITY_ID,NUM_OF_PERIODS,SOURCE,NUM_OF_SUBPERIODS,
  PERIOD_COL_NAME,SUBPERIOD_COL_NAME,YEARLY_FLAG,EDW_FLAG,CALENDAR_ID,EDW_PERIODICITY_ID,
  CUSTOM_CODE,DB_COLUMN_NAME,PERIODICITY_TYPE,PERIOD_TYPE_ID,RECORD_TYPE_ID,XTD_PATTERN, short_name) values (
  g_greg_year_per_id,1,g_greg_qtr_per_id,0,'PERIOD',null,1,0,g_greg_cal_id,0,2,'YEAR',1,128,128,l_xtd_pattern, g_greg_year_short_name);
Line: 2347

    insert into bsc_sys_periodicities_tl(PERIODICITY_ID,LANGUAGE,SOURCE_LANG,NAME,CREATED_BY,
    CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
    values(g_greg_year_per_id,g_lang(i),l_source_lang,l_name,g_who,sysdate,g_who,sysdate,g_who);
Line: 2383

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_greg_day_per_id,l_year,l_day, g_dbi_cal_record(i).start_date, g_dbi_cal_record(i).end_date, null,null,g_who,sysdate,g_who,sysdate,g_who,
    g_dbi_cal_record(i).cal_month||'/'||g_dbi_cal_record(i).cal_day||'/'||g_dbi_cal_record(i).cal_year);
Line: 2388

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(l_year,g_greg_day_per_id,l_day,1,g_lang(j),g_src_lang,g_dbi_cal_record(i).report_date,null);
Line: 2393

    insert into bsc_db_calendar(CALENDAR_YEAR,CALENDAR_MONTH,CALENDAR_DAY,YEAR,SEMESTER,
    QUARTER,BIMESTER,MONTH,WEEK52,WEEK4,DAY365,DAY30,HOLYDAY_FLAG,WORKDAY_FLAG,CALENDAR_ID,
    CUSTOM_1,CUSTOM_2,CUSTOM_3)
    values(g_dbi_cal_record(i).cal_year,g_dbi_cal_record(i).cal_month,g_dbi_cal_record(i).cal_day,
    l_year,0,0,0,0,0,0,0,0,null,null,g_greg_cal_id,l_day,l_period,l_qtr);
Line: 2405

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_greg_period_per_id,g_dbi_greg_period(i).year_id,g_dbi_greg_period(i).sequence, g_dbi_greg_period(i).start_date, g_dbi_greg_period(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_greg_period(i).month_id);
Line: 2410

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_greg_period(i).year_id,g_greg_period_per_id,g_dbi_greg_period(i).sequence,1,g_lang(j),
      g_src_lang,g_dbi_greg_period(i).name,null);
Line: 2418

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_greg_qtr_per_id,g_dbi_greg_qtr(i).year_id,g_dbi_greg_qtr(i).sequence, g_dbi_greg_qtr(i).start_date, g_dbi_greg_qtr(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_greg_qtr(i).quarter_id);
Line: 2423

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_greg_qtr(i).year_id,g_greg_qtr_per_id,g_dbi_greg_qtr(i).sequence,1,g_lang(j),g_src_lang,
      g_dbi_greg_qtr(i).name,null);
Line: 2431

    insert into bsc_sys_periods(PERIODICITY_ID,YEAR,PERIOD_ID,START_DATE,END_DATE,START_PERIOD,
    END_PERIOD,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,TIME_FK)
    values(g_greg_year_per_id,g_dbi_greg_year(i).sequence,g_dbi_greg_year(i).sequence, g_dbi_greg_year(i).start_date, g_dbi_greg_year(i).end_date, null,null,
    g_who,sysdate,g_who,sysdate,g_who,g_dbi_greg_year(i).year_id);
Line: 2436

      insert into bsc_sys_periods_tl(YEAR,PERIODICITY_ID,PERIOD_ID,MONTH,LANGUAGE,SOURCE_LANG,NAME,SHORT_NAME)
      values(g_dbi_greg_year(i).sequence,g_greg_year_per_id,g_dbi_greg_year(i).sequence,1,g_lang(j),g_src_lang,
      g_dbi_greg_year(i).name,null);
Line: 2447

procedure delete_dbi_calendar_metadata is
---
cursor c1 is select calendar_id from bsc_sys_calendars_b where edw_calendar_type_id in (1) and
edw_calendar_id in (1001,1002,1003);
Line: 2455

    write_to_log_file_n('In delete_dbi_calendar_metadata'||get_time);
Line: 2458

    write_to_log_file_n('select calendar_id from bsc_sys_calendars_b where edw_calendar_type_id in (1) and
    edw_calendar_id in (1001,1002,1003)');
Line: 2466

      write_to_log_file_n('delete bsc_sys_periodicities_tl where periodicity_id in '||
      '(select periodicity_id from bsc_sys_periodicities  where calendar_id='||l_calendar_id||')'||get_time);
Line: 2469

    delete bsc_sys_periodicities_tl where periodicity_id in
    (select periodicity_id from bsc_sys_periodicities  where calendar_id=l_calendar_id);
Line: 2472

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2475

      write_to_log_file_n('delete bsc_sys_periodicities where calendar_id='||l_calendar_id||';'||get_time);
Line: 2477

    delete bsc_sys_periodicities where calendar_id=l_calendar_id;
Line: 2479

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2482

      write_to_log_file_n('delete bsc_sys_calendars_tl where calendar_id='||l_calendar_id||');'||get_time);
Line: 2484

    delete bsc_sys_calendars_tl where calendar_id=l_calendar_id;
Line: 2486

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2489

      write_to_log_file_n('delete bsc_sys_calendars_b where calendar_id='||l_calendar_id||');'||get_time);
Line: 2491

    delete bsc_sys_calendars_b where calendar_id=l_calendar_id;
Line: 2493

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2498

  write_to_log_file_n('Error in delete_dbi_calendar_metadata '||g_status_message||get_time);
Line: 2502

procedure delete_dbi_calendars
is
---
cursor c1 is select calendar_id from bsc_sys_calendars_b where edw_calendar_type_id in (1) and
edw_calendar_id in (1001,1002,1003);
Line: 2511

    write_to_log_file_n('In delete_dbi_calendars'||get_time);
Line: 2514

    write_to_log_file_n('select calendar_id from bsc_sys_calendars_b where edw_calendar_type_id in (1) and
    edw_calendar_id in (1001,1002,1003)');
Line: 2522

      write_to_log_file_n('delete bsc_sys_periods where periodicity_id in (select periodicity_id '||
      'from bsc_sys_periodicities where calendar_id='||l_calendar_id||');'||get_time);
Line: 2525

    delete bsc_sys_periods where periodicity_id in (select periodicity_id from bsc_sys_periodicities
    where calendar_id=l_calendar_id);
Line: 2528

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2531

      write_to_log_file_n('delete bsc_sys_periods_tl where periodicity_id in (select periodicity_id '||
      'from bsc_sys_periodicities where calendar_id='||l_calendar_id||');'||get_time);
Line: 2534

    delete bsc_sys_periods_tl where periodicity_id in (select periodicity_id from bsc_sys_periodicities
    where calendar_id=l_calendar_id);
Line: 2537

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2540

      write_to_log_file_n('delete bsc_db_calendar where calendar_id='||l_calendar_id||');'||get_time);
Line: 2542

    delete bsc_db_calendar where calendar_id=l_calendar_id;
Line: 2544

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2550

      write_to_log_file_n('delete bsc_reporting_calendar where calendar_id='||l_calendar_id||');'||get_time);
Line: 2552

    delete bsc_reporting_calendar where calendar_id=l_calendar_id;
Line: 2554

      write_to_log_file_n('Deleted '||sql%rowcount||' rows '||get_time);
Line: 2560

  write_to_log_file_n('Error in delete_dbi_calendars '||g_status_message||get_time);
Line: 2583

cursor c1 is select language_code from FND_LANGUAGES where INSTALLED_FLAG in ('I', 'B');
Line: 2644

  select bsc_sys_periodicity_id_s.nextval into l_seqval from dual;
Line: 2654

  select bsc_sys_calendar_id_s.nextval into l_seqval from dual;
Line: 2697

cursor c1(p_cal_id number) is select day365 from bsc_db_calendar where calendar_id=p_cal_id
order by calendar_year desc,calendar_month desc,calendar_day desc;
Line: 2765

      write_to_log_file_n('select day365 from bsc_db_calendar where calendar_id=:1
      order by calendar_year desc,calendar_month desc,calendar_day desc using '||p_cal_id);
Line: 2805

cursor c1(p_cal_id number) is select day365 from bsc_db_calendar where calendar_id=p_cal_id
order by calendar_year desc,calendar_month desc,calendar_day desc;
Line: 2857

      write_to_log_file_n('select day365 from bsc_db_calendar where calendar_id=:1
      order by calendar_year desc,calendar_month desc,calendar_day desc using '||g_445_cal_id);
Line: 2907

cursor c1 is select start_month||'/'||start_day||'/'||current_year from bsc_sys_calendars_b
where edw_calendar_type_id=1 and edw_calendar_id=1001;
Line: 2917

    write_to_log_file_n('select to_date(start_month||''/''||start_day||''/''||current_year,''MM/DD/YYYY'') '||
    'from bsc_sys_calendars_b where edw_calendar_type_id=1 and edw_calendar_id=1001');
Line: 2980

cursor c1 is select start_month||'/'||start_day||'/'||current_year from bsc_sys_calendars_b
where edw_calendar_type_id=1 and edw_calendar_id=1002;
Line: 2991

    write_to_log_file_n('select to_date(start_month||''/''||start_day||''/''||current_year,''MM/DD/YYYY'') '||
    'from bsc_sys_calendars_b where edw_calendar_type_id=1 and edw_calendar_id=1002');
Line: 3045

cursor c1 is select start_month||'/'||start_day||'/'||current_year from bsc_sys_calendars_b
where edw_calendar_type_id=1 and edw_calendar_id=1003;
Line: 3056

    write_to_log_file_n('select to_date(start_month||''/''||start_day||''/''||current_year,''MM/DD/YYYY'') '||
    'from bsc_sys_calendars_b where edw_calendar_type_id=1 and edw_calendar_id=1003');
Line: 3106

  cursor c1 is select name, source_lang from bis_levels_tl tl, bis_levels l
  where l.short_name = p_dim and
  l.level_id = tl.level_id and
  tl.language = p_lang;
Line: 3114

    write_to_log_file_n('select name from bis_levels_vl where short_name='||p_dim);
Line: 3132

cursor c1 is select meaning, source_lang from fnd_lookup_values where lookup_type=p_lookup_type
and lookup_code=p_lookup_code
and language=p_lang;
Line: 3158

SELECT distinct attribute2
 from ak_region_items
 where attribute1 ='DIMENSION LEVEL'
 and  attribute2 like 'TIME+%';
Line: 3174

select periodicity_id, calendar_id from bsc_sys_periodicities where short_name= p_time_level_name;
Line: 3215

cursor c1 is select 1 from bsc_sys_calendars_b where edw_calendar_type_id=1 and edw_calendar_id =1001;
Line: 3231

cursor c1 is select 1 from user_objects where object_name='FII_TIME_DAY';
Line: 3246

    l_sql:='select 1 from fii_time_day where rownum=1';
Line: 3275

cursor c1 is select calendar_id from bsc_sys_calendars_b where edw_calendar_type_id = 1;
Line: 3283

    write_to_log_file_n('cursor c1 is select calendar_id from bsc_sys_calendars_b where edw_calendar_type_id = 1;'||get_time);
Line: 3291

      l_oo.delete;