ORA-00933:SQL命令在pyspark表达式中未正确结束



我不明白这个查询出了什么问题。有人可以向我解释错误在哪里。非常感谢

SELECT
WF1.GUID,
WF1.COD_FONTE,
WF1.NOME_FILE,
VW.COD_STEP_PRECEDENTE,
VW.COD_STEP_ATTUALE AS WF1
FROM
MONITOR.FILE_WORKFLOW
INNER JOIN MONITOR.VW_JOB_FONTE_STEP AS VW ON WF1.COD_FONTE = VW.COD_FONTE
AND VW.JOB_KEY = 'FLATTENER'
WHERE
WF1.GUID = '5f58d00b6102ab20a8d5c83f'
AND WF1.ESITO = 'OK'
AND WF1.COD_STEP = VW.COD_STEP_PRECEDENTE
AND NOT EXISTS (
SELECT
1
FROM
MONITOR.FILE_WORKFLOW AS WF2
WHERE
WF2.GUID = '5f58d00b6102ab20'
AND WF2.ESITO = 'OK'
AND WF2.COD_STEP = VW.COD_STEP_ATTUALE
AND WF1.IDE_FILE_WORKFLOW_PARENT = WF2.IDE_FILE_WORKFLOW_PARENT
)

我确信您使用的表别名是错误的

VW.COD_STEP_ATTUALE AS WF1 <-- WF1 is a column alias 
FROM
MONITOR.FILE_WORKFLOW

INNER JOIN MONITOR.VW_JOB_FONTE_STEP AS VW 
ON WF1.COD_FONTE = VW.COD_FONTE <-- here you are using WF1 as a table alias

我想这将解决的问题

VW.COD_STEP_ATTUALE
FROM
MONITOR.FILE_WORKFLOW WF1 <-- alias name goes here

相关内容

  • 没有找到相关文章

最新更新