This commit is contained in:
dheepa
2021-08-09 11:14:23 +00:00
parent a0d3257be0
commit f3cf5e1d2d
89 changed files with 4769 additions and 1508 deletions

View File

@@ -201,7 +201,7 @@ from staging2.BUDNI_ARC_test_obs_summary_block where trx_record=1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -240,6 +240,26 @@ tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_ARC_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -451,7 +451,7 @@ from staging2.BUDNI_BRK_test_obs_summary_block where trx_record=1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
update transactional.test_instance
@@ -495,6 +495,27 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_BRK_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -163,7 +163,7 @@ from staging2.BUDNI_DBP_Drawbar_Perf_Block where trx_record = 1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -195,6 +195,28 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_DBP_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -347,7 +347,7 @@ from staging2.budni_fld_test_obs_summary_block where trx_record=1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -392,6 +392,28 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_budni_fld_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -293,7 +293,7 @@ where trx_record=1
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -353,6 +353,29 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_HDL_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -208,7 +208,7 @@ from staging2.budni_hlg_test_obs_summary_block where trx_record=1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -248,6 +248,28 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_budni_hlg_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -158,7 +158,7 @@ from staging2.budni_lcg_gravity_test_block where trx_record=1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -189,6 +189,29 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_LCG_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -294,7 +294,7 @@ from staging2.budni_nmt_test_obs_summary_block where trx_record=1;
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -340,6 +340,28 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_NMT_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -214,7 +214,7 @@ select
column2,column3,column4,column5,column6,column7,
column8,column9,block_row_number
from staging2.stg_process_table_BUDNI_NMT a
where block_tag ='BUDNI_NMT_Noise_at_bystander_position';
where block_tag ='BUDNI_NMT_Noise_at_bystanders_position';
update staging2.BUDNI_NMT_noise_at_bystander_position_block
@@ -334,7 +334,7 @@ select
column2,column3,column4,column5,column6,column7,
column8,column9,block_row_number
from staging2.stg_process_table_BUDNI_NMT a
where block_tag ='BUDNI_NMT_Noise_at_operator_ear_level';
where block_tag ='BUDNI_NMT_Noise_at_operators_ear_level';
update staging2.BUDNI_NMT_Noise_at_operator_ear_level_block set make=__make,model=__model;
execute 'update staging2.BUDNI_NMT_Noise_at_operator_ear_level_block set

View File

@@ -188,7 +188,7 @@ column4::int,
column5::numeric,
column6::numeric,column7::int,column8::numeric,
column9::numeric,column10,column11,column12
from staging2.BUDNI_PTO_MMTKeyword1_block
from staging2.BUDNI_PTO_Parameter1_block
where trx_record=1;
@@ -223,7 +223,7 @@ make,model,
column3,
column4::numeric,column5::numeric,column6::numeric,column7::numeric,column8::numeric,column9,
column10,column11::numeric,column12::numeric
from staging2.BUDNI_PTO_MMTKeyword2_block
from staging2.BUDNI_PTO_Parameter2_block
where trx_record=1 and column3='Natural Ambient';
insert into transactional.budni_test_observations
@@ -257,7 +257,7 @@ where block_row_number in (3,4) and trx_record=1
select syspk into __test_instance_id from transactional.test_instance where file_syspk =__file_syspk;
select tractor_model into __model from transactional.test_instance where file_syspk =__file_syspk;
select tractor_make into __make from transactional.test_instance where file_syspk =__file_syspk;
select syspk from transactional.test_master into __test_master_id where test_type ='BUDNI';
select syspk from transactional.test_master into __test_master_id where test_type ='Budni';
select syspk into __test_instance_tractor_id from transactional.test_instance_tractor_info where file_syspk =__file_syspk;
@@ -304,6 +304,21 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_type = a.test_type,
test_name= a.test_name
from fw_core.test_file_sheet_format_master a
where transactional.test_instance.file_sheet_mnemonic = a.file_sheet_mnemonic
and transactional.test_instance.file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_PTO_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end

View File

@@ -41,8 +41,8 @@ truncate table staging2.stg_specific_table_BUDNI_PTO;
truncate table staging2.stg_process_table_BUDNI_PTO;
truncate table staging2.BUDNI_PTO_Spec_H1_Block;
truncate table staging2.BUDNI_PTO_Perf_Report_block;
truncate table staging2.BUDNI_PTO_MMTKeyword1_Block;
truncate table staging2.BUDNI_PTO_MMTKeyword2_Block;
truncate table staging2.BUDNI_PTO_Parameter1_Block;
truncate table staging2.BUDNI_PTO_Parameter2_Block;
truncate table staging2.BUDNI_PTO_Summary_Block;
@@ -126,7 +126,7 @@ execute 'insert into staging2.stg_process_table_budni_pto
select a.* , RANK () OVER ( ORDER BY row_number) as block_row_number,b.block_tag as block_tag
from staging2.stg_specific_table_budni_pto a
join transactional.source_config b
on a.row_number >row_number_start
on a.row_number >=row_number_start
and (a.row_number< row_read_end or row_read_end is null)
and f1_modified=''PTO Performance Report''
and b.file_mnemonic='''||p_file_mnemonic||''' and b.file_sheet_mnemonic='''||p_file_sheet_mnemonic||'''';
@@ -136,7 +136,7 @@ select a.* , RANK () OVER ( ORDER BY row_number) as block_row_number,b.block_tag
join transactional.source_config b
on a.row_number >=row_number_start
and (a.row_number< row_read_end or row_read_end is null)
and f1_modified=''MMTKeyword1''
and f1_modified=''Parameter1''
and b.file_mnemonic='''||p_file_mnemonic||''' and b.file_sheet_mnemonic='''||p_file_sheet_mnemonic||'''';
execute 'insert into staging2.stg_process_table_budni_pto
@@ -144,7 +144,7 @@ select a.* , RANK () OVER ( ORDER BY row_number) as block_row_number,b.block_tag
join transactional.source_config b
on a.row_number >=row_number_start
and (a.row_number< row_read_end or row_read_end is null)
and f1_modified=''MMTKeyword2''
and f1_modified=''Parameter2''
and b.file_mnemonic='''||p_file_mnemonic||''' and b.file_sheet_mnemonic='''||p_file_sheet_mnemonic||'''';
execute 'insert into staging2.stg_process_table_budni_pto
@@ -276,56 +276,56 @@ file_sheet_mnemonic='''||p_file_sheet_mnemonic||''',
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_PTO_Perf_Report_block');
/* blocks data loading - BUDNI_PTO_MMTKeyword1_block */
/* blocks data loading - BUDNI_PTO_Parameter1_block */
perform fw_core.fn_jobctl_block_begin(__client_id,__function_id,__file_syspk,
'BUDNI_PTO_MMTKeyword1_block',__file_mnemonic,__file_sheet_mnemonic,3);
err_block:='BUDNI_PTO_MMTKeyword1_block';
'BUDNI_PTO_Parameter1_block',__file_mnemonic,__file_sheet_mnemonic,3);
err_block:='BUDNI_PTO_Parameter1_block';
insert into staging2.BUDNI_PTO_MMTKeyword1_block
insert into staging2.BUDNI_PTO_Parameter1_block
( column2,column3,column4,column5,column6,column7,column8,column9,column10,column11,column12,block_row_number)
select column2,column3,column4,column5,column6,column7,column8,column9,column10,column11,column12,block_row_number
from staging2.stg_process_table_budni_pto
where block_tag='BUDNI_PTO_MMTKeyword1';
where block_tag='BUDNI_PTO_Parameter1';
update staging2.BUDNI_PTO_MMTKeyword1_block set trx_record=0 where block_row_number in (1,2);
update staging2.BUDNI_PTO_Parameter1_block set trx_record=0 where block_row_number in (1,2);
update staging2.BUDNI_PTO_MMTKeyword1_block set make=__make,model=__model;
execute 'update staging2.BUDNI_PTO_MMTKeyword1_block set
update staging2.BUDNI_PTO_Parameter1_block set make=__make,model=__model;
execute 'update staging2.BUDNI_PTO_Parameter1_block set
client_id='||p_client_id||',
function_id='||p_function_id||',
file_mnemonic='''||p_file_mnemonic||''',
file_sheet_mnemonic='''||p_file_sheet_mnemonic||''',
file_syspk='||p_file_syspk||'';
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_PTO_MMTKeyword1_block');
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_PTO_Parameter1_block');
/* blocks data loading - BUDNI_PTO_MMTKeyword2_block */
/* blocks data loading - BUDNI_PTO_Parameter2_block */
perform fw_core.fn_jobctl_block_begin(__client_id,__function_id,__file_syspk,
'BUDNI_PTO_MMTKeyword2_block',__file_mnemonic,__file_sheet_mnemonic,4);
err_block:='BUDNI_PTO_MMTKeyword2_block';
'BUDNI_PTO_Parameter2_block',__file_mnemonic,__file_sheet_mnemonic,4);
err_block:='BUDNI_PTO_Parameter2_block';
insert into staging2.BUDNI_PTO_MMTKeyword2_block
insert into staging2.BUDNI_PTO_Parameter2_block
( column2,column3,column4,column5,column6,column7,column8,column9,column10,column11,column12,block_row_number)
select column2,column3,column4,column5,column6,column7,column8,column9,column10,column11,column12,block_row_number
from staging2.stg_process_table_budni_pto
where block_tag='BUDNI_PTO_MMTKeyword2';
where block_tag='BUDNI_PTO_Parameter2';
update staging2.BUDNI_PTO_MMTKeyword2_block set trx_record=0 where block_row_number in (1,2);
update staging2.BUDNI_PTO_Parameter2_block set trx_record=0 where block_row_number in (1,2);
update staging2.BUDNI_PTO_MMTKeyword2_block set make=__make,model=__model;
execute 'update staging2.BUDNI_PTO_MMTKeyword2_block set
update staging2.BUDNI_PTO_Parameter2_block set make=__make,model=__model;
execute 'update staging2.BUDNI_PTO_Parameter2_block set
client_id='||p_client_id||',
function_id='||p_function_id||',
file_mnemonic='''||p_file_mnemonic||''',
file_sheet_mnemonic='''||p_file_sheet_mnemonic||''',
file_syspk='||p_file_syspk||'';
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_PTO_MMTKeyword2_block');
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_PTO_Parameter2_block');
/* blocks data loading -BUDNI_PTO_Summary_Block */

View File

@@ -228,6 +228,20 @@ tractor_model =__model,
tractor_make=__make
where file_syspk=__file_syspk;
update transactional.test_instance
set test_file_name =(select a.file_name from staging1.staging_generic_table a where file_syspk = __file_syspk limit 1)
where file_syspk = __file_syspk;
update transactional.test_instance b
set date_of_test = (select a.date_of_test from transactional.test_instance a where a.date_Of_test is not null and a.file_syspk = __file_syspk and a.file_mnemonic = 'BUDNI' and file_sheet_mnemonic='BUDNI_PTO')::date
where
b.date_Of_test is null
and b.file_syspk = __file_syspk
and b.file_mnemonic = 'BUDNI';
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_BUDNI_VMT_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
end