Вы находитесь на странице: 1из 2

update saeprod set prod_rec_prod =(select prod_rec_prod from grupop@ol_punto10:saeprod otro whe re otro.prod_cod_empr=81 and otro.prod_cod_sucu=121 and otro.

prod_cod_prod=saepr od.prod_cod_prod), prod_bar_prod =(select prod_bar_prod from grupop@ol_punto10:saeprod otro where otro.prod_cod_empr=81 and otro.prod_cod_sucu=121 and otro.prod_cod_prod=saeprod. prod_cod_prod), prod_obs_sino =(select prod_obs_sino from grupop@ol_punto10:saeprod otro where otro.prod_cod_empr=81 and otro.prod_cod_sucu=121 and otro.prod_cod_prod=saeprod. prod_cod_prod) , prod_bar_repo =(select prod_bar_repo from grupop@ol_punto10:saeprod otro where otro.prod_cod_empr=81 and otro.prod_cod_sucu=121 and otro.prod_cod_prod=saeprod. prod_cod_prod), prod_cod_rema =(select prod_cod_rema from grupop@ol_punto10:saeprod otro where otro.prod_cod_empr=81 and otro.prod_cod_sucu=121 and otro.prod_cod_prod=saeprod. prod_cod_prod), prod_cod_reco =(select prod_cod_reco from grupop@ol_punto10:saeprod otro where otro.prod_cod_empr=81 and otro.prod_cod_sucu=121 and otro.prod_cod_prod=saeprod. prod_cod_prod) where prod_cod_empr=81 and prod_cod_sucu=121; update saesecu set secu_ing_comp = (select secu_ing_comp from grupop@ol_desarrollo2:saesecu otr o where otro.secu_cod_empr=saesecu.secu_cod_empr and otro.secu_cod_sucu=saesecu. secu_cod_sucu), secu_egr_comp = (select secu_egr_comp from grupop@ol_desarrollo2:saesecu otro wh ere otro.secu_cod_empr=saesecu.secu_cod_empr and otro.secu_cod_sucu=saesecu.secu _cod_sucu), secu_dia_comp = (select secu_dia_comp from grupop@ol_desarrollo2:saesecu otro wh ere otro.secu_cod_empr=saesecu.secu_cod_empr and otro.secu_cod_sucu=saesecu.secu _cod_sucu), secu_asi_comp = (select secu_asi_comp from grupop@ol_desarrollo2:saesecu otro wh ere otro.secu_cod_empr=saesecu.secu_cod_empr and otro.secu_cod_sucu=saesecu.secu _cod_sucu); update saectab set ctab_num_cheq = (select ctab_num_cheq from grupop@ol_desarrol lo2:saectab otro where otro.ctab_cod_ctab=saectab.ctab_cod_ctab);

update saedmov set dmov_cod_tran = (select minv_cod_tran from saeminv where minv_num_comp=dmov_num_comp and minv_cod_empr=dmov_cod_empr and minv_cod_sucu=dmov_cod_sucu and minv_cod_ejer=dmov_cod_ejer and minv_num_prdo=dmov_num_prdo ), dmov_fec_fmov= (select minv_fmov from saeminv where minv_num_comp=dmov_num_comp and minv_cod_empr=dmov_cod_empr and minv_cod_sucu=dmov_cod_sucu and minv_cod_ejer=dmov_cod_ejer and minv_num_prdo=dmov_num_prdo ), dmov_tip_defi= (select defi_tip_defi from saedefi where defi_cod_empr=dmov_cod_empr and defi_cod_tran = (select minv_cod_tran

from saeminv where minv_num_comp=dmov_num_comp and minv_cod_empr=dmov_cod_empr and minv_cod_sucu=dmov_cod_sucu and minv_cod_ejer=dmov_cod_ejer and minv_num_prdo=dmov_num_prdo ) ) where dmov_cod_tran is null; insert into saepven select * from grupop@ol_desarrollo2:saepven where pven_cod_empr=2 and pven_cod_p ven in ( select pven_cod_pven from grupop@ol_desarrollo2:saefopa where fopa_tip_fopa='5' and fopa_efe_fopa>0 and fopa_chk_auto="N" and pven_cod_empr=2); insert into saefopa select * from grupop@ol_desarrollo2:saefopa where fopa_tip_fopa='5' and fopa_efe _fopa>0 and fopa_chk_auto="N" and pven_cod_empr=2);

Вам также может понравиться