sql
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user