mmt sql
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
drop function if exists staging2.fn_BUDNI_NMT_Block ;
|
||||
CREATE OR REPLACE FUNCTION staging2.fn_BUDNI_NMT_Block(p_client_id int,p_function_id int, p_file_mnemonic text,p_file_sheet_mnemonic text, p_file_syspk int)
|
||||
CREATE OR REPLACE FUNCTION staging2.fn_budni_nmt_block(p_client_id integer, p_function_id integer, p_file_mnemonic text, p_file_sheet_mnemonic text, p_file_syspk integer)
|
||||
RETURNS void
|
||||
LANGUAGE plpgsql
|
||||
AS $function$
|
||||
@@ -125,7 +124,6 @@ order by a.row_number';
|
||||
|
||||
|
||||
|
||||
|
||||
execute 'insert into staging2.stg_process_table_BUDNI_NMT
|
||||
select a.* , RANK () OVER ( ORDER BY row_number) as block_row_number,b.block_tag as block_tag
|
||||
from staging2.stg_specific_table_BUDNI_NMT a
|
||||
@@ -197,7 +195,7 @@ and b.block_row_number=5
|
||||
and a.file_syspk=b.file_syspk;
|
||||
|
||||
|
||||
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_NMT_Spec_H1_Block');
|
||||
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_NMT_Spec_H1_block');
|
||||
|
||||
|
||||
/* blocks data loading - BUDNI_NMT_noise_at_bystander_position_block */
|
||||
@@ -216,7 +214,6 @@ column8,column9,block_row_number
|
||||
from staging2.stg_process_table_BUDNI_NMT a
|
||||
where block_tag ='BUDNI_NMT_Noise_at_bystander’s_position';
|
||||
|
||||
|
||||
update staging2.BUDNI_NMT_noise_at_bystander_position_block
|
||||
set column2=column3 where block_row_number=1;
|
||||
|
||||
@@ -277,7 +274,7 @@ update staging2.BUDNI_NMT_Atmos_Cond_1_Block
|
||||
set trx_record=0 where
|
||||
block_row_number in (1,2,3);
|
||||
|
||||
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_NMT_Atmos_Cond_1_Block ');
|
||||
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_NMT_Atmos_Cond_1_Block');
|
||||
|
||||
|
||||
|
||||
@@ -315,7 +312,7 @@ file_syspk='||p_file_syspk||',
|
||||
file_mnemonic='''||p_file_mnemonic||''',
|
||||
file_sheet_mnemonic='''||p_file_sheet_mnemonic||'''';
|
||||
|
||||
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_NMT_Meas_Results_1_Block ');
|
||||
perform fw_core.fn_jobctl_block_end(__file_syspk,'BUDNI_NMT_Meas_Results_1_Block');
|
||||
|
||||
|
||||
/* blocks data loading - BUDNI_NMT_Noise_at_operator_ear_level_block */
|
||||
@@ -462,8 +459,3 @@ perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compege
|
||||
end
|
||||
$function$
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user