Home » Developer & Programmer » Precompilers, OCI & OCCI » PCB-S-00576, PLS-103: Encountered the symbol "INDEX"
icon9.gif  PCB-S-00576, PLS-103: Encountered the symbol "INDEX" [message #137994] Mon, 19 September 2005 06:00
mass80i
Messages: 1
Registered: September 2005
Junior Member
When I compile this Cobol program (Server Express 2.2 - Oracle 10.1.0.4) obtain follow error:

EXEC SQL EXECUTE
begin
OPEN :WS-CURSOR-NAME FOR
SELECT /*+ INDEX (a invsana1) */
O.NRPOL
,O.DTDECPOL
,O.CDSTATUS
,NVL(T.NMDESCR,O.CDTARIFFA || O.POT)
,O.CDAGESUB || ' ' || O.CDISP || ' ' ||
O.CDSETTORE || ' ' || O.CDZONA
,O.DTEMIS
,RTRIM(A.COGNOMEASS) || ' ' || RTRIM(A.NOMEASS)
,RTRIM(A.COGNOMECONTR) || ' ' || RTRIM(A.NOMECONTR)
,O.CAF
FROM
TBVSOUT O, TBVSANA A , TBTARIF T
WHERE
O.CDAGESUB =
LPAD(TO_CHAR(:HV-AGENZIA),5,'0')
AND (DECODE(:HV-ISPAGEN,'__',' ',
LPAD(:HV-ISPAGEN,2,' '))= O.CDISP
OR :HV-ISPAGEN= ' ')
AND (DECODE(:HV-SETTORE,'_',' ',
LPAD(:HV-SETTORE,1,' '))= O.CDSETTORE
OR :HV-SETTORE= ' ')
AND O.NRPOL = A.NRPOL
AND O.CAF = A.CAF
AND A.NOMEASS LIKE RTRIM(:HV-NOMEASS) || '%'
AND A.COGNOMEASS LIKE RTRIM(:HV-COGNASS) || '%'
AND (TO_DATE(A.DTNASCASS,'DD/MM/YYYY')
= :HV-DTNASCASS
OR '01/01/0001' = :HV-DTNASCASS)
AND A.CDAGESUB = LPAD(TO_CHAR(:HV-AGENZIA),5,'0')
AND T.CDSOC (+) = 1
AND T.CDTARIFFA (+) =
DECODE (LENGTH(RTRIM(O.CDTARIFFA)),2, O.CDTARIFFA ||
O.POT,1, O.CDTARIFFA || ' ' || O.POT)
AND O.NRPOL >:HV-POLIZZA
ORDER BY O.NRPOL;
end;
END-EXEC

ERROR:

PCB-S-00576, PLS-103: Encountered the symbol "INDEX" when expecting one of the following:

( * - + all case mod new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table avg count current distinct max min prior sql stddev sum
unique variance execute the forall merge <a SQL statement>
time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set
specification>
<an alternatively-quoted SQL string>

Can you help Me?

Thanxx

Massi
Previous Topic: C++ Runtime Error - Java ????
Next Topic: loading flat file to oracle tables using c program
Goto Forum:
  


Current Time: Thu Mar 28 06:52:32 CDT 2024