Home » Developer & Programmer » Precompilers, OCI & OCCI » analytic functions in Pro*C
analytic functions in Pro*C [message #94355] Fri, 27 August 2004 11:05
Martin
Messages: 83
Registered: February 2000
Member
Is it possible to use analytic functions in Pro*C?  I'm new to Pro*C.  I tried to compile this statement but it doesn't like it.

Thanks ahead of time.

Pro*C/C++: Release 8.1.7.1.0 - Production on Fri Aug 27 15:10:15 2004

(c) Copyright 2000 Oracle Corporation. All rights reserved.

System default option values taken from: ora_proc20:pcscfg.cfg

Syntax error at line 6779, column 28, file 10yr_sr_pub_extract.pc:

Error at line 6779, column 28 in file 10yr_sr_pub_extract.pc

ROW_NUMBER() OVER (PARTITION BY o.workperson_id ORDER BY td.rank) rn

...........................1

PCC-S-02201, Encountered the symbol "(" when expecting one of the following:

, into, from,

Error at line 0, column 0 in file 10yr_sr_pub_extract.pc

PCC-F-02102, Fatal error while doing C preprocessing

 

This is my code:

EXEC SQL DECLARE officer_cursor CURSOR FOR

SELECT opd,

nvl(rank1,0),

nvl(rank2,0),

nvl(rank3,0),

nvl(rank4,0)

FROM (SELECT aa.opd,

max(decode(rn,1,aa.tdrank,null)) rank1,

max(decode(rn,2,aa.tdrank,null)) rank2,

max(decode(rn,3,aa.tdrank,null)) rank3,

max(decode(rn,4,aa.tdrank,null)) rank4

FROM (SELECT o.workperson_id OPD, td.rank TDRANK,

ROW_NUMBER() OVER (PARTITION BY o.workperson_id ORDER BY td.rank) rn

FROM titleDOMAIN@REB_STEP_LINK TD,

OFFICER_TITLEDOMAIN@REB_STEP_LINK T_D,

OFFICER@REB_STEP_LINK O

WHERE COMPANY_ID = 835

AND TD.ID = T_D.TITLEDOMAIN_ID

AND O.ID = T_D.OFFICER_ID) aa

GROUP BY aa.opd ORDER BY aa.opd) zz

ORDER BY rank1, rank2, rank3, rank4;
Previous Topic: OCCI Library
Next Topic: 10g client with red hat 9cc3.3.2 run time error
Goto Forum:
  


Current Time: Thu Mar 28 06:34:59 CDT 2024