changed scripts in budni and soon

This commit is contained in:
Deepthi
2021-03-30 17:35:08 +05:30
parent 61520e5dfc
commit 1c1e8da68e
39 changed files with 10516 additions and 822 deletions

View File

@@ -1,6 +1,8 @@
drop function if exists mmt_staging2.fn_PTO_PNA_ODS;
CREATE OR REPLACE FUNCTION mmt_staging2.fn_PTO_PNA_ODS()
RETURNS void AS $$
declare __test_instance_id int;
declare __file_syspk int;
begin
/*************************************************************
@@ -171,6 +173,24 @@ select client_id,function_id,file_syspk,file_format,sheet_mnemonic,make,model,
c2::numeric,c3::numeric,c4::numeric,c5::numeric,c6::numeric,c7::numeric
from mmt_staging2.PTOBST_PNA_smoke_test_block
where ods_record=1 ;
end
select file_syspk into __file_syspk from mmt_staging2.PTOBST_RPT_tractor_specs_block;
select syspk into __test_instance_id from mmt_ods.test_instance where test_file_ref_no =__file_syspk;
update mmt_ods.PTO_Key_Perf_Parameters
set test_instance_id=__test_instance_id
where test_file_ref_no=__file_syspk;
update mmt_ods.PTO_Perf_Results
set test_instance_id=__test_instance_id
where test_file_ref_no=__file_syspk;
update mmt_ods.pto_smoke_test
set test_instance_id=__test_instance_id
where test_file_ref_no=__file_syspk;
end
$$ LANGUAGE plpgsql;