sql
This commit is contained in:
@@ -105,7 +105,7 @@ end if;
|
||||
continue;
|
||||
end if;
|
||||
|
||||
|
||||
perform archive.fn_run_block_archive(w_client_id, w_function_id);
|
||||
|
||||
--run transactional scripts depending on sheet mnemonic
|
||||
if f.file_sheet_mnemonic = 'FTDRY_TRS' then
|
||||
@@ -189,6 +189,9 @@ end if;
|
||||
end if;
|
||||
end loop;
|
||||
|
||||
|
||||
perform transactional.fn_run_updates(w_client_id, w_function_id);
|
||||
|
||||
-- update fw_jobctl_file_runschedule table.
|
||||
|
||||
update fw_core.fw_jobctl_file_runschedule set end_status_note = 'stg2_failed', end_status='error',staging_type = 'stg2',end_time=now() from fw_core.fw_jobctl_file_sheet_runschedule a
|
||||
@@ -206,14 +209,10 @@ SELECT SUM (case WHEN end_status = 'success' THEN 1
|
||||
if (success_sum > 0 or success_sum is null) then
|
||||
update fw_core.fw_jobctl_runschedule_jobstep set end_status_note = 'trx_completed', end_status='success', end_time=now() where job_id = w_job_id and step_id = w_step_id and latest_runschedule_flag = '1';
|
||||
else
|
||||
update fw_core.fw_jobctl_runschedule_jobstep set end_status_note = 'trx_failed', end_status='error', end_time=now() where job_id = w_job_id and step_id = w_step_id and latest_runschedule_flag = '1';
|
||||
update fw_core.fw_jobctl_runschedule_jobstep set end_status_note = 'trx_failed', end_status='success', end_time=now() where job_id = w_job_id and step_id = w_step_id and latest_runschedule_flag = '1';
|
||||
end if;
|
||||
|
||||
|
||||
|
||||
--insert into fw_core.track_jobstep select *,'master_wrapper' from fw_core.fw_jobctl_runschedule_jobstep;
|
||||
--insert into fw_core.track_file select *,'mater_wrapper' from fw_core.fw_jobctl_file_runschedule;
|
||||
--insert into fw_core.track_file_sheet select *,'master_wrapper' from fw_core.fw_jobctl_file_sheet_runschedule;
|
||||
|
||||
end;
|
||||
$$ LANGUAGE plpgsql;
|
||||
Reference in New Issue
Block a user