delete from t_s_yyyy_mm_ww_dd where year = substr(iv_date_year,0,4);
vi_result := sql%rowcount;
commit;
vv_week_format_value := fun_sys_get_num_week(to_char(vd_date_temp,'yyyymmdd'),vi_week_tsart_flag);
while vd_date_temp<= vd_date_year
loop
begin
insert into t_s_yyyy_mm_ww_dd
(year, month, week, day, yyyymmdd,month_order,week_order,day_order,year_order)
values
(to_char(vd_date_temp, 'yyyy'),
to_char(vd_date_temp, vv_Month_format),
--to_char(vd_date_temp+1, vv_week_format),
fc_sys_get_week_format(vv_week_format_value,vv_week_format),
to_char(vd_date_temp, vv_date_format),
to_char(vd_date_temp, 'yyyyMMdd'),
to_char(vd_date_temp, 'yyyyMM'),
--to_char(vd_date_temp+1, 'yyyyiw'),
vv_week_format_value,
to_char(vd_date_temp, 'yyyyMMdd'),
to_char(vd_date_temp, 'yyyy')
);
vd_date_temp := vd_date_temp + 1;
vv_week_format_value := fun_sys_get_num_week(to_char(vd_date_temp,'yyyymmdd'),vi_week_tsart_flag);
end;
end loop;
vi_result := sql%rowcount;
commit;
LBI_SYS_VDF.prc_s_rpt_data_up_time(vv_table_name);