REPLACE INTO falta_histo_mat (id_alu,cod_cur,cod_mat,fec_fal,jus_fal,num_hor,tip_fal) VALUES( 1088970456,(select cod_cur from alumcurso where id_alu= 1088970456), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 2,'t'),( 1088970579,(select cod_cur from alumcurso where id_alu= 1088970579), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1004710719,(select cod_cur from alumcurso where id_alu= 1004710719), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970579,(select cod_cur from alumcurso where id_alu= 1088970579), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1004710719,(select cod_cur from alumcurso where id_alu= 1004710719), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970613,(select cod_cur from alumcurso where id_alu= 1088970613), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088971177,(select cod_cur from alumcurso where id_alu= 1088971177), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 2,'t'),( 1088970431,(select cod_cur from alumcurso where id_alu= 1088970431), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 1,'t'),( 1088970417,(select cod_cur from alumcurso where id_alu= 1088970417), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970417,(select cod_cur from alumcurso where id_alu= 1088970417), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970029,(select cod_cur from alumcurso where id_alu= 1088970029), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970029,(select cod_cur from alumcurso where id_alu= 1088970029), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970417,(select cod_cur from alumcurso where id_alu= 1088970417), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970431,(select cod_cur from alumcurso where id_alu= 1088970431), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 1,'t'),( 1088971177,(select cod_cur from alumcurso where id_alu= 1088971177), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 2,'t'),( 1088970613,(select cod_cur from alumcurso where id_alu= 1088970613), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1004710719,(select cod_cur from alumcurso where id_alu= 1004710719), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088970613,(select cod_cur from alumcurso where id_alu= 1088970613), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 3,'t'),( 1088971177,(select cod_cur from alumcurso where id_alu= 1088971177), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 2,'t'),( 1088970431,(select cod_cur from alumcurso where id_alu= 1088970431), 9,(SELECT fec_cor_tot FROM periodo where id_peri=4),'injust', 1,'t')