sql
This commit is contained in:
@@ -116,7 +116,7 @@ implement_size,
|
||||
hitch_category,
|
||||
trim('kg' from implement_weight)::numeric,
|
||||
soil_type,
|
||||
moisture_content::numeric soil_moisture_content_pct,
|
||||
moisture_content::text soil_moisture_content_pct,
|
||||
bulk_density_g_cc::numeric soil_bulk_density_g_per_cc,
|
||||
trim(' Kpa' from soil_cone_index)::numeric soil_cone_index,
|
||||
field_condition,
|
||||
|
||||
@@ -78,7 +78,7 @@ objective_of_test,
|
||||
background_of_test,
|
||||
job_order_no,
|
||||
test_location test_location_name,
|
||||
soil_moisture_content_::numeric soil_moisture_content_pct ,
|
||||
soil_moisture_content_::text soil_moisture_content_pct ,
|
||||
soil_bulk_density_g_cc::int soil_bulk_density_g_per_cc,
|
||||
test_engineer,
|
||||
test_operator,
|
||||
@@ -200,7 +200,7 @@ tractor_sr_no,
|
||||
'front',
|
||||
front_tyre_make tyre_make,
|
||||
front_tyre_size tyre_size,
|
||||
front_tyre_pressure_psi::int tyre_pressure_psi
|
||||
front_tyre_pressure_psi::numeric tyre_pressure_psi
|
||||
from staging2.ftdry_trs_spec_block where trx_record=1;
|
||||
|
||||
update transactional.test_instance_tyre_info a
|
||||
@@ -238,7 +238,7 @@ tractor_sr_no,
|
||||
'rear',
|
||||
rear_tyre_make tyre_make,
|
||||
rear_tyre_size tyre_size,
|
||||
rear_tyre_pressure_psi::int tyre_pressure_psi
|
||||
rear_tyre_pressure_psi::numeric tyre_pressure_psi
|
||||
from staging2.ftdry_trs_spec_block where trx_record=1;
|
||||
|
||||
update transactional.test_instance_tyre_info a
|
||||
@@ -267,9 +267,9 @@ file_sheet_mnemonic
|
||||
select
|
||||
client_id,
|
||||
function_id,
|
||||
low_idle::int low_idle_observed ,
|
||||
high_idle::int high_idle_observed ,
|
||||
rated_rpm::int,
|
||||
low_idle::numeric low_idle_observed ,
|
||||
high_idle::numeric high_idle_observed ,
|
||||
rated_rpm::numeric,
|
||||
engine_to_pto_ratio_540_pto,
|
||||
engine_to_pto_ratio_540e_pto,
|
||||
tractor_model,
|
||||
@@ -364,6 +364,17 @@ 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
|
||||
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;
|
||||
|
||||
|
||||
|
||||
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_FTDRY_TRS_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
|
||||
|
||||
end
|
||||
|
||||
@@ -369,6 +369,16 @@ 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
|
||||
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;
|
||||
|
||||
|
||||
|
||||
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_FTHLG_TRS_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
|
||||
|
||||
end
|
||||
|
||||
@@ -117,34 +117,19 @@ file_mnemonic,
|
||||
file_sheet_mnemonic
|
||||
from staging2.ftwet_sum_implement_block where trx_record=1;
|
||||
|
||||
|
||||
insert into transactional.field_perf_summary_implement_info
|
||||
(
|
||||
client_id,
|
||||
function_id,
|
||||
type_of_cage_wheel,
|
||||
cage_wheel_width_mm,
|
||||
cage_wheel_weight,
|
||||
cage_wheel_inner_and_outer_ring_dia_mm,
|
||||
cage_wheel_center_ring_dia_mm,
|
||||
no_of_angles_on_cage_wheel,
|
||||
file_syspk,
|
||||
file_mnemonic,
|
||||
file_sheet_mnemonic
|
||||
)
|
||||
select
|
||||
client_id,
|
||||
function_id,
|
||||
Type_of_Cage_Wheel,
|
||||
Cage_Wheel_Width_mm::numeric,
|
||||
Cage_wheel_Weight::numeric,
|
||||
Cage_Wheel_inner_Outer_Ring_Dia_mm::numeric cage_wheel_inner_and_outer_ring_dia_mm,
|
||||
Cage_Wheel_Center_Ring_Dia_mm::numeric,
|
||||
No_of_angles_on_cage_wheel::numeric,
|
||||
file_syspk,
|
||||
file_mnemonic,
|
||||
file_sheet_mnemonic
|
||||
from staging2.FTWET_SUM_Cage_Wheel_Block where trx_record=1;
|
||||
update transactional.field_perf_summary_implement_info a
|
||||
set
|
||||
type_of_cage_wheel= b.Type_of_Cage_Wheel,
|
||||
cage_wheel_width_mm =b.Cage_Wheel_Width_mm::numeric,
|
||||
cage_wheel_weight =b.Cage_wheel_Weight::numeric,
|
||||
cage_wheel_inner_and_outer_ring_dia_mm = b.Cage_Wheel_inner_Outer_Ring_Dia_mm::numeric,
|
||||
cage_wheel_center_ring_dia_mm = b.Cage_Wheel_Center_Ring_Dia_mm::numeric,
|
||||
no_of_angles_on_cage_wheel = b.No_of_angles_on_cage_wheel::numeric
|
||||
from staging2.FTWET_SUM_Cage_Wheel_Block b
|
||||
where a.file_syspk = b.file_syspk
|
||||
and a.file_mnemonic = b.file_mnemonic
|
||||
and a.file_sheet_mnemonic = b.file_sheet_mnemonic
|
||||
and b.trx_record=1;
|
||||
|
||||
|
||||
insert into transactional.field_perf_summary
|
||||
|
||||
@@ -367,6 +367,17 @@ 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
|
||||
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;
|
||||
|
||||
|
||||
|
||||
|
||||
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'trx', 'fn_FTWET_TRS_TRX', err_state, err_msg, err_detail, err_hint, err_context,'success');
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user