1 2
|
INSERT INTO asushdheader ( apar_gr_id , apar_id , apar_id_ref , apar_name , apar_once , apar_type , bank_account , bonus_gr , cash_delay , clearing_code , client , collect_flag , comp_reg_no , control , country_code , credit_limit , currency , currency_set , description , disc_code , expired_date , ext_apar_ref , fac_short_set , factor_short , foreign_acc , intrule_id , invoice_code , language , last_update , main_apar_id , message_text , pay_delay , pay_method , pay_method_set , pay_temp_id , postal_acc , priority_no , short_name , status , swift , tax_code , tax_set , tax_system , tc_set , terms_id , terms_set , trans_date , user_id , vat_reg_no , wf_state , change_seq_no , change_status ) SELECT apar_gr_id , apar_id , apar_id_ref , apar_name , apar_once , apar_type , bank_account , bonus_gr , cash_delay , clearing_code , client , collect_flag , comp_reg_no , control , country_code , credit_limit , currency , currency_set , description , disc_code , expired_date , ext_apar_ref , fac_short_set , factor_short , foreign_acc , intrule_id , invoice_code , language , last_update , main_apar_id , message_text , pay_delay , pay_method , pay_method_set , pay_temp_id , postal_acc , priority_no , short_name , status , swift , tax_code , tax_set , tax_system , tc_set , terms_id , terms_set , trans_date , user_id , vat_reg_no , wf_state , 40676 , 'D' FROM asushdheader WHERE client = '11' AND apar_id = '46744' AND last_update = (SELECT max(last_update ) FROM asushdheader WHERE client = '11' AND apar_id = '46744' ) |
Partager