免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3974 | 回复: 2

求助 proc编译报 PCC-S-02201 [复制链接]

论坛徽章:
0
发表于 2011-10-17 20:41 |显示全部楼层
报错:

proc userid=DLADM/oracle@192.168.1.2:1521/zydb SQLCHECK=SEMANTICS include=/database/product/10.2.0/db_1/bin/proc RB06.pc

Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Oct 17 19:44:23 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

System default option values taken from: /database/product/10.2.0/db_1/precomp/admin/pcscfg.cfg

Syntax error at line 74, column 36, file RB06.pc:
Error at line 74, column 36 in file RB06.pc
            FROM T_INVM_CUS IN_CUS LEFT JOIN Z_INCT_CRT0 INCT0 ON IN_CUS.INVM_ME
MB_CUST_AC=INCT0.INCT_ACCT_NO LEFT JOIN  TPC_COM_CURM  CURM
...................................1
PCC-S-02201, Encountered the symbol "LEFT" when expecting one of the following:

   ; , union, connect, group, having, intersect, minus, start,
   where, with,

Syntax error at line 74, column 91, file RB06.pc:
Error at line 74, column 91 in file RB06.pc
            FROM T_INVM_CUS IN_CUS LEFT JOIN Z_INCT_CRT0 INCT0 ON IN_CUS.INVM_ME
MB_CUST_AC=INCT0.INCT_ACCT_NO LEFT JOIN  TPC_COM_CURM  CURM
................................................................................
..........1
PCC-S-02201, Encountered the symbol "=" when expecting one of the following:

   : ) [ ] / . an identifier, a numeric constant,
The symbol "=" was ignored.

SQL语句
EXEC SQL INSERT INTO RB06_ACT_TMP(CUSNO ,SUM_AMT)
            SELECT  IN_CUS.CUID_CUST_NO ,SUM(NVL(INCT0.INCT_01_AMOUNT, 0) * NVL(CURM.RATVAL, 0))
            FROM T_INVM_CUS IN_CUS
                 LEFT JOIN Z_INCT_CRT0 INCT0
                 ON IN_CUS.INVM_MEMB_CUST_AC = INCT0.INCT_ACCT_NO
                 LEFT JOIN  TPC_COM_CURM  CURM
                 ON INCT0.INCT_TRN_DATE = CURM.DATA_DATE
                 AND INCT0.INCT_01_CURR = CURM.CURCDE
            WHERE  INCT0.INCT_01_CURR <> 'CNY'
              AND CURM.XRTCDE = 'USD'
              AND INCT0.INCT_TRN_CODE IN ('60', '1060')
              AND INCT0.INCT_CHANNEL = '0'
              AND INCT0.INCT_TRN_DATE = 2011-8-8
            GROUP BY IN_CUS.CUID_CUST_NO
            HAVING ABS(SUM(NVL(INCT0.INCT_01_AMOUNT, 0) * NVL(CURM.RATVAL, 0))) >= 5;


SQL语句在PL/SQL调试没问题

baidu.google下,说是语法问题,说把左连接写成(+)的形式,不是很懂
是不是在proc中不能用连接?

论坛徽章:
0
发表于 2011-10-17 20:43 |显示全部楼层
其中proc版本

Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Oct 17 20:41:46 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

System default option values taken from: /database/product/10.2.0/db_1/precomp/admin/pcscfg.cfg

论坛徽章:
0
发表于 2011-10-18 08:58 |显示全部楼层
你写的SQL不是ORACLE标准的SQL
理论上讲ORACLE也是支持的,但建议不要用
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP