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

@@ -226,7 +226,7 @@ and block_tag='IHTEMT_EMT_H1'
insert into staging2.IHTEMT_EMT_H1_INT (c1,c2)
select split_part(column2,':',1),split_part(column2,':',2)
from staging2.stg_process_table_IHTEMT_EMT
where block_tag='IHTEMT_EMT_Footer' and block_row_number=1;
where block_tag='IHTEMT_EMT_Brake_Pedal' and block_row_number=14;
insert into staging2.IHTEMT_EMT_H1_INT (c1,c2)
select 'Test Purpose',column9
@@ -249,6 +249,8 @@ Test_Request_no,
Sample_Receipt_Date,
Test_report_No,
Tractor_Model,
tractor_power_hp,
variant,
Generation,
Customer_Name,
Test_Engineer,
@@ -257,6 +259,8 @@ No_of_Sample,
Test_Start_Date,
Test_End_Date,
Tractor_Sr_No,
drive,
platform,
Test_Standard_Refer,
Test_Location,
Operator_Name,
@@ -272,10 +276,10 @@ FROM crosstab(
, row_number() OVER ()
, unnest(ARRAY[c2::text]) AS val
FROM staging2.IHTEMT_EMT_H1_INT
ORDER BY generate_series(1,15),2'
ORDER BY generate_series(1,15), syspk,2'
) t (col text,a_1 text,a_2 text,a_3 text,a_4 text,a_5 text,a_6 text,a_7 text,a_8 text,
a_9 text,a_10 text,a_11 text,a_12 text,a_13 text,a_14 text,a_15 text,a_16 text,a_17 text,
a_18 text,a_19 text,a_20 text);
a_18 text,a_19 text,a_20 text, a_21 text, a_22 text, a_23 text, a_24 text);
delete from staging2.IHTEMT_EMT_H1_Block where dummy_f is null ;
@@ -379,7 +383,7 @@ FROM crosstab(
, row_number() OVER ()
, unnest(ARRAY[column14::text,column18::text]) AS val
FROM staging2.IHTEMT_EMT_Weight_Tyre_Int where block_row_number between 3 and 11
ORDER BY generate_series(1,15),2'
ORDER BY generate_series(1,15),syspk,2'
) t (col text,a_1 text,a_2 text,a_3 text,a_4 text,a_5 text,a_6 text,a_7 text,a_8 text,a_9 text);
delete from staging2.IHTEMT_EMT_Tyre_Details_Block where dummy_f is null ;
@@ -452,6 +456,7 @@ file_mnemonic='''||p_file_mnemonic||''',
file_sheet_mnemonic='''||p_file_sheet_mnemonic||'''';
update staging2.IHTEMT_EMT_Steering_Block set trx_record =0 where block_row_number in (1,2,3);
update staging2.IHTEMT_EMT_Steering_Block set trx_record =0 where column4 is null and column5 is null and column6 is null and column8 is null ;
perform fw_core.fn_jobctl_block_end(__file_syspk,'IHTEMT_EMT_Steering_Block');