- 论坛徽章:
- 0
|
报错:
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;
其中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
SQL语句在PL/SQL调试没问题
baidu.google下,说是语法问题,(有试改pcscfg.cfg文件,有修改字体,有包含头文件sqlca的方式,都不行)说把左连接写成(+)的形式,不是很懂
是不是在proc中不能用连接? |
|