how to show the date where the value of this is null in mysql

0

Good morning guys, I would like you to please help me. I'm doing an attendance record and in the consultation I do, I get what I want, but in some cases the date comes out as null, what I want is to show me the date that the person has not marked their attendance, I do not know if you can help me I do not know how to solve this.

This is my query:

SELECT  tb_horarios.codigopersonal, tb_personal_org.nombres, tb_registroasistencia.fecha, 
        tb_horarios.j_codigo, tb_horarios.dia, tb_horarios.hora_entrada, tb_horarios.hora_salida, 
        tb_registroasistencia.hora_entra, tb_registroasistencia.hora_sale, 
        tb_horarios.numero_horas, 
        (SEC_TO_TIME((TIMESTAMPDIFF(MINUTE, tb_horarios.hora_entrada, tb_registroasistencia.hora_entra))*60)) AS ATRASOS
from  tb_horarios 
LEFT JOIN tb_registroasistencia ON (tb_horarios.codigopersonal = tb_registroasistencia.psn_codigo) 
          and (tb_horarios.j_codigo = tb_registroasistencia.jnd_codigo) 
          AND (tb_horarios.dia= tb_registroasistencia.dia)
LEFT JOIN tb_personal_org ON tb_horarios.codigopersonal = tb_personal_org.codigo
where  tb_horarios.prd_codigo=1  
ORDER BY 'tb_personal_org'.'nombres'  ASC
    
asked by vero m. 16.01.2018 в 17:00
source

0 answers