query and subquery

Hi,
i have two querys:
in query main i need "Estacion_Origen". This values is in WRS_SP_ObtenerSolicitudSeg: (s.intidpaso,  pa.varnompaso as vardespaso)
Do not understand why this query:
(
SELECT MAX(TO_CHAR(S.INTIDPASO) ||'' - '' || TO_CHAR(PA.VARNOMPASO))
FROM SOLICITUDSEGUIMIENTO S,
     PASO PA,
     PERFIL  PF
WHERE S.INTIDNUMEROPROVISION = SR.INTIDNUMEROPROVISION
      AND SOL.INTIDNUMEROPROVISION = SR.INTIDNUMEROPROVISIONORI
      AND S.INTIDPROCESO = PRO.INTIDPROCESO
      AND S.INTIDPASO = PA.INTIDPASO
      AND PRO.INTIDPROCESO = PA.INTIDPROCESO
      AND S.INTIDDECISION = PAR.INTCODPARAMETRO
      AND S.INTIDPERFIL  = PF.INTIDPERFIL ) AS "Estación Origen",
BRING ME NO VALUE


queryMAIN.jpg
queryMAIN.txt
WRS-SP-ObtenerSolicitudSeg.jpg
WRS-SP-ObtenerSolicitudSeg.txt
enrique_aeoAsked:
Who is Participating?
 
OP_ZaharinConnect With a Mentor Commented:
- check your WHERE clause condition if its all met. if any of the condition fail will results to no value.

      WHERE S.INTIDNUMEROPROVISION = SR.INTIDNUMEROPROVISION
      AND SOL.INTIDNUMEROPROVISION = SR.INTIDNUMEROPROVISIONORI
      AND S.INTIDPROCESO = PRO.INTIDPROCESO
      AND S.INTIDPASO = PA.INTIDPASO
      AND PRO.INTIDPROCESO = PA.INTIDPROCESO
      AND S.INTIDDECISION = PAR.INTCODPARAMETRO
      AND S.INTIDPERFIL  = PF.INTIDPERF
0
 
SharathData EngineerCommented:
>> Do not understand why this query:
What is your question here?
0
 
enrique_aeoAuthor Commented:
I need to see change querymain "estacion_destino. " This value is shown in WRS_SP_ObtenerSolicitudSeg: (s.intidpaso, pa.varnompaso as vardespaso)
0
 
enrique_aeoAuthor Commented:
sorry, "estacion_origen"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.