Ayuda Resta SQL
Publicado por Ale (11 intervenciones) el 18/11/2017 01:13:59
Hola alguien me ayuda con este query?
select c1.JKL1_LOG_GRB_TS-c2.JKL1_LOG_GRB_TS as tiempo_de_respuesta from
(select JKL1_LOG_GRB_TS as hora_pregunta from ASTJKLM1 where JKL1_TIP_MSJ_CD ='P') as c1
(select JKL1_LOG_GRB_TS as hora_pregunta from ASTJKLM1 where JKL1_TIP_MSJ_CD ='R') as c2
where c1.JKL1_OPE_SIA_ULT_NU = c2.JKL1_OPE_SIA_ULT_NU;
Quiero restar la sentencia C1 con la sentencia C2 cuando sean el mismo numero de operacion.
Gracias, saludos.
select c1.JKL1_LOG_GRB_TS-c2.JKL1_LOG_GRB_TS as tiempo_de_respuesta from
(select JKL1_LOG_GRB_TS as hora_pregunta from ASTJKLM1 where JKL1_TIP_MSJ_CD ='P') as c1
(select JKL1_LOG_GRB_TS as hora_pregunta from ASTJKLM1 where JKL1_TIP_MSJ_CD ='R') as c2
where c1.JKL1_OPE_SIA_ULT_NU = c2.JKL1_OPE_SIA_ULT_NU;
Quiero restar la sentencia C1 con la sentencia C2 cuando sean el mismo numero de operacion.
Gracias, saludos.
Valora esta pregunta
0