wuchen20x 发表于 2012-05-13 18:20

pro*c 复杂语句报错

小弟初学PROC,遇到个问题,求解决阿
select a*(select value from t_b where key='a') from t_a;
pro*c是这样写的:
EXEC SQL DECLARE pr_cur CURSOR FOR
      SELECT rs * (SELECT value FROM t_mapWHERE key='a')
      FROM t_a;

这句话在SQLDEVELOPER里面运行正确,在PROC里面就报错:
Syntax error at line 47, column 23, file rpmgr.pc:
Error at line 47, column 23 in file rpmgr.pc
                SELECT rs * (SELECT value FROM t_map    WHERE key='a')
......................1
PCC-S-02201, Encountered the symbol "value" when expecting one of the following:

   ( ) * + - / . @ | at, day, hour, minute, month, second, year,
The symbol ")" was substituted for "value" to continue.

Syntax error at line 47, column 53, file rpmgr.pc:
Error at line 47, column 53 in file rpmgr.pc
                SELECT rs * (SELECT value FROM t_map    WHERE key='a')
....................................................1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:

   ; * + - / | for, union, at, connect, and, group, having,
   intersect, minus, or, order, start, with, day, hour, minute,
   month, second, year,

Error at line 0, column 0 in file rpmgr.pc
PCC-F-02102, Fatal error while doing C preprocessing
make: *** 错误 1

zhlin0054 发表于 2012-08-12 22:41

这语句也整理好一点,都看晕了,都是字母
页: [1]
查看完整版本: pro*c 复杂语句报错