DELETE FROM falta_histo_mat WHERE falta_histo_mat.num_hor=0 OR 
				((id_alu,cod_cur,cod_mat,tip_fal)=(1004711049,1164,28,'t')
				and (fec_fal>= (SELECT fec_ini FROM periodo WHERE id_peri=3) and 
				fec_fal<=(SELECT fec_cor_tot FROM periodo WHERE id_peri=3)))