REPLACE INTO falta_histo_mat (id_alu,cod_cur,cod_mat,fec_fal,jus_fal,num_hor,tip_fal) VALUES( 9906211208,(select cod_cur from alumcurso where id_alu= 9906211208), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 9,'t'),( 1007310886,(select cod_cur from alumcurso where id_alu= 1007310886), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 9,'t'),( 1007310998,(select cod_cur from alumcurso where id_alu= 1007310998), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004711498,(select cod_cur from alumcurso where id_alu= 1004711498), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710601,(select cod_cur from alumcurso where id_alu= 1004710601), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710739,(select cod_cur from alumcurso where id_alu= 1004710739), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710663,(select cod_cur from alumcurso where id_alu= 1004710663), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 98083168021,(select cod_cur from alumcurso where id_alu= 98083168021), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310984,(select cod_cur from alumcurso where id_alu= 1007310984), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007797122,(select cod_cur from alumcurso where id_alu= 1007797122), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310889,(select cod_cur from alumcurso where id_alu= 1007310889), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310985,(select cod_cur from alumcurso where id_alu= 1007310985), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710645,(select cod_cur from alumcurso where id_alu= 1004710645), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 99100809997,(select cod_cur from alumcurso where id_alu= 99100809997), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310967,(select cod_cur from alumcurso where id_alu= 1007310967), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310958,(select cod_cur from alumcurso where id_alu= 1007310958), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310949,(select cod_cur from alumcurso where id_alu= 1007310949), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004711445,(select cod_cur from alumcurso where id_alu= 1004711445), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710642,(select cod_cur from alumcurso where id_alu= 1004710642), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710618,(select cod_cur from alumcurso where id_alu= 1004710618), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710707,(select cod_cur from alumcurso where id_alu= 1004710707), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 99100308807,(select cod_cur from alumcurso where id_alu= 99100308807), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1002807280,(select cod_cur from alumcurso where id_alu= 1002807280), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310993,(select cod_cur from alumcurso where id_alu= 1007310993), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310993,(select cod_cur from alumcurso where id_alu= 1007310993), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1002807280,(select cod_cur from alumcurso where id_alu= 1002807280), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 99100308807,(select cod_cur from alumcurso where id_alu= 99100308807), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710707,(select cod_cur from alumcurso where id_alu= 1004710707), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710618,(select cod_cur from alumcurso where id_alu= 1004710618), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710642,(select cod_cur from alumcurso where id_alu= 1004710642), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004711445,(select cod_cur from alumcurso where id_alu= 1004711445), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310949,(select cod_cur from alumcurso where id_alu= 1007310949), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310958,(select cod_cur from alumcurso where id_alu= 1007310958), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310967,(select cod_cur from alumcurso where id_alu= 1007310967), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 99100809997,(select cod_cur from alumcurso where id_alu= 99100809997), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710645,(select cod_cur from alumcurso where id_alu= 1004710645), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310985,(select cod_cur from alumcurso where id_alu= 1007310985), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310889,(select cod_cur from alumcurso where id_alu= 1007310889), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007797122,(select cod_cur from alumcurso where id_alu= 1007797122), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310984,(select cod_cur from alumcurso where id_alu= 1007310984), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 98083168021,(select cod_cur from alumcurso where id_alu= 98083168021), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710663,(select cod_cur from alumcurso where id_alu= 1004710663), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710739,(select cod_cur from alumcurso where id_alu= 1004710739), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004710601,(select cod_cur from alumcurso where id_alu= 1004710601), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1004711498,(select cod_cur from alumcurso where id_alu= 1004711498), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310998,(select cod_cur from alumcurso where id_alu= 1007310998), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 8,'t'),( 1007310886,(select cod_cur from alumcurso where id_alu= 1007310886), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 9,'t'),( 9906211208,(select cod_cur from alumcurso where id_alu= 9906211208), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 9,'t'),( 1007310886,(select cod_cur from alumcurso where id_alu= 1007310886), 9,(SELECT fec_cor_tot FROM periodo where id_peri=3),'injust', 9,'t')