I have a problem where I have an application that runs an appointment, but when running this query triggers an Error of ORA-00904 :: invalid identifier, but it does not say which identifier is invalid But when I squeeze it by the SQL tool runs without problem. I would like to know if you have any form, some select where I can see more in the background the mistakes fired by Oracle, to try to discover this identifier. Anybody know?
below the consultation
SELECT this_.DH_CONSULTA_INI AS y0_,
((DH_CONSULTA_INI - DBAMV.FNC_MVGF_MAIOR_DH_PROCESSO( this_.DH_CONSULTA_INI, this_.CD_TRIAGEM_ATENDIMENTO, ',30, 31,') )*24*60*60*1000) AS media,
this_.CD_TRIAGEM_ATENDIMENTO AS y2_,
this_.CD_ATENDIMENTO AS y3_,
this_.DS_SENHA AS y4_,
this_.DH_CLASSIFICACAO_INI AS y5_,
this_.DH_CLASSIFICACAO_FIM AS y6_
FROM dbamv.GF_DADOS this_
WHERE this_.DS_SEQUENCIA_PROCESSO ='1,2,3,4,5'
AND this_.CD_MULTI_EMPRESA =1
AND this_.DH_CONSULTA_INI IS NOT NULL
AND TO_CHAR(DH_CONSULTA_INI,'hh24:mi:ss') >= '00:00:00'
AND TO_CHAR(DH_CONSULTA_INI,'hh24:mi:ss') <= '23:59:59'
AND this_.DH_CONSULTA_INI BETWEEN sysdate AND sysdate - 1
AND DBAMV.FNC_MVGF_MAIOR_DH_PROCESSO( this_.DH_CONSULTA_INI, this_.CD_TRIAGEM_ATENDIMENTO, ',30, 31,') IS NOT NULL
AND this_.CD_CLASSIFICACAO =10
AND this_.DH_CLASSIFICACAO_INI IS NULL
AND this_.CD_FILA_SENHA IN (select cd_fila_senha from FILA_SENHA)
ORDER BY this_.DH_CONSULTA_INI ASC