Select * from turnos Where fecha >= '2025-06-24 07:00:00' and fecha <= '2025-06-24 21:00:00' and cancelado <> 1 and (estado=0) and confirmacionsms is NULL and not(paciente like '*****************%') and nrocentro=1 and nroprofesional > 0 Order By fecha,nropaciente
Select * from turnos Where fecha <= '2025-06-23 18:00:00' and (confirmacionsms='enviado' or confirmacionsms='aenviar' or confirmacionsms='entregado' or confirmacionsms='noentregado') and not(paciente like '*****************%') Order By fecha,nropaciente