预期出现以下情况时遇到符号“ INNER”

时间:2019-08-11 11:01:11

标签: oracle plsql

transform: scale(4) rotate(10deg);

在上面的代码中,我得到了编译错误:

CURSOR CUR_OP_BAL IS 
SELECT GLD.GOLDSMITH_ID, RTRIM(LTRIM(PTY.LC_PARTY_FIRST_NAME)) || ' ' || 
                         RTRIM(LTRIM(NVL(PTY.LC_PARTY_LAST_NAME,''))) AS GOLDSMITH_NAME, 
       PTY.LC_PARTY_SHORT_NAME 
  FROM PUR_GOLDSMITH_ML_T GLD 
 INNER JOIN COM_LOCAL_PARTY_MST_T PTY ON GLD.GOLDSMITH_ID = PTY.LC_PARTY_ID 
 ORDER BY GOLDSMITH_NAME;

请给我适当的解决方法

1 个答案:

答案 0 :(得分:0)

不确定该问题,但我在代码中看到的是按别名顺序使用别名“ GOLDSMITH_NAME”,这是不可能的,只有在它上面再写一个select语句时,这才有可能,像这样的东西:

选择*来自

(SELECT GLD.GOLDSMITH_ID,RTRIM(LTRIM(PTY.LC_PARTY_FIRST_NAME))||''||

                     RTRIM(LTRIM(NVL(PTY.LC_PARTY_LAST_NAME,''))) AS GOLDSMITH_NAME, 

   PTY.LC_PARTY_SHORT_NAME 

从PUR_GOLDSMITH_ML_T GLD

INNER JOIN COM_LOCAL_PARTY_MST_T PTY在GLD.GOLDSMITH_ID = PTY.LC_PARTY_ID  )

按GOLDSMITH_NAME订购;