该SQL语句在 PL/SQL中能正确的执行,并得出结果,请教在pro*C中如果解决编译问题?!
PROC*C 编译 错误描述如下: Syntax error at line 490, column 270, file deliver_wap.pc:
Error at line 490, column 270 in file deliver_wap.pc
                        EXEC SQL select count(*) into :serach_adp_flag from (sel
ect c.adp_id, m.company_name, m.serach_flag from (select adp_id from op_serach_c
ompany_embody_tb a where a.serach_company_info_id = :ora_serach_id) c, (select i
d, adp_city, company_name, auditing_flag, (select SUM(nvl(check_number,'0')) ser
ach_flag from op_check_page_tb  where adp_id = id) serach_flag from sys_yp_adp_i
nfo_tb) m where m.id = c.adp_id and m.adp_city = :ora_city_code and m.auditing_f
lag = '0' group by c.adp_id, m.adp_city, m.company_name, m.serach_flag order by 
m.serach_flag desc);
................................................................................
................................................................................
................................................................................
.............................1
PCC-S-02201, Encountered the symbol "SUM" when expecting one of the following:   ( ) * + - / . @ | at, day, hour, minute, month, second, year,
The symbol "(" was substituted for "SUM" to continue.Syntax error at line 490, column 297, file deliver_wap.pc:
Error at line 490, column 297 in file deliver_wap.pc
                        EXEC SQL select count(*) into :serach_adp_flag from (sel
ect c.adp_id, m.company_name, m.serach_flag from (select adp_id from op_serach_c
ompany_embody_tb a where a.serach_company_info_id = :ora_serach_id) c, (select i
d, adp_city, company_name, auditing_flag, (select SUM(nvl(check_number,'0')) ser
ach_flag from op_check_page_tb  where adp_id = id) serach_flag from sys_yp_adp_i
nfo_tb) m where m.id = c.adp_id and m.adp_city = :ora_city_code and m.auditing_f
lag = '0' group by c.adp_id, m.adp_city, m.company_name, m.serach_flag order by 
m.serach_flag desc);
................................................................................
................................................................................
................................................................................
........................................................1
PCC-S-02201, Encountered the symbol "serach_flag" when expecting one of the foll
owing:   , ) * + - / | at, day, hour, minute, month, second, year,Syntax error at line 0, column 0, file deliver_wap.pc:
Error at line 0, column 0 in file deliver_wap.pc
PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:   ; : an identifier, end-exec, random_terminalError at line 0, column 0 in file deliver_wap.pc
PCC-F-02102, Fatal error while doing C preprocessing
make[1]: *** [deliver_wap.o] Error 1