I can not round off, what I need is that I have a left join
of which the ON
is two concat
LEFT JOIN BD_MigracionQV.dbo.TBL_QV_Hecho_Produccion_IF Produccion
ON CONCAT(Cita.IdPaciente, Cita.IdMedico,
convert(char(10), Cita.FechaCita,101))=CONCAT(Produccion.IdPaciente,Produccion.IdMedicoAtencion,convert(char(10),Produccion.Fecha,101))
What happens is that in this part you join the two tables that one is good but the problem is the date that changes In the first CONCAT
is fine but in the second varies on the date as commented, The concat
can be one like this
CONCAT(Produccion.IdPaciente,Produccion.IdMedicoAtencion,convert(char(10),
Produccion.Fecha,101)) o CONCAT(Produccion.IdPaciente,Produccion.IdMedicoAtencion,
convert(char(10),Produccion.FechaInicioOa,101))