谢谢bell6248!我正在try你的方法。
不过,我在metalink里面查了一下,这个确实属于bug:
Bug No. 1419472
Filed 28-SEP-2000 Updated 22-SEP-2006
Product Precompilers Product Version 8.1.6
Platform Solaris Operating System (SPARC 64-bit) Platform Version No Data
Database Version 8.1.6 Affects Platforms Generic
Severity Minimal Loss of Service Status To Filer for Review
Base Bug 2296107 Fixed in Product Version 11.1
Problem statement:
PCC-S-2201 ON EXEC SQL SELECT WITH RANK OVER PARTITION
Pro*C/C++: Release 8.1.7.0.0 - Production on Thu Sep 28 11:51:09 2000 . . System default option values taken from: /vobs/oracle/precomp/admin/pcscfg.cfg . Syntax error at line 86, column 25, file test.pc: Error at line 86, column 25 in file test.pc RANK() OVER (PARTITION BY deptno ORDER BY sal DESC, comm) as rk ........................1 PCC-S-02201, Encountered the symbol "(" when expecting one of the following: . , into, from, . Error at line 0, column 0 in file test.pc . =======================================================================
. V8.2 LABEL=PRECOMP_MAIN_SOLARIS_000831 . . Pro*C/C++: Release 8.2.0.0.0 - Production on Thu Sep 28 11:58:13 2000 . . System default option values taken from: /vobs/oracle/precomp/admin/pcscfg.cfg . Syntax error at line 86, column 25, file test.pc: Error at line 86, column 25 in file test.pc RANK() OVER (PARTITION BY deptno ORDER BY sal DESC, comm) as rk ........................1 PCC-S-02201, Encountered the symbol "(" when expecting one of the following: . , into, from, . Error at line 0, column 0 in file test.pc PCC-F-02102, Fatal error while doing C preprocessing