Oracle pro*c compiler error using REGEXP_LIKE

From: Brian StJohn <oneiromancer.org_at_gmail.com>
Date: Mon, 3 Nov 2008 13:51:52 -0800 (PST)
Message-ID: <be450b3f-21a6-441b-b911-ca905b9024c6@b31g2000prb.googlegroups.com>

Good afternoon,

I have a c/c++ api into some oracle database tables. I'm trying to perform a bulk cursor select using the REGEXP_LIKE function, but I am getting an interesting pre-compiler problem:

Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Nov 3 14:43:28 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

System default option values taken from: /opt/oracle/product/10.2.0/ precomp/admin/pcscfg.cfg

Syntax error at line 133, column 125, file xcd.pc: Error at line 133, column 125 in file xcd.pc

   EXEC SQL DECLARE xdcdcsrl CURSOR FOR SELECT doc_id FROM xcd WHERE REGEXP_LIKE( tc, 'elect', 'i' );

............................................................................................................................
1
PCC-S-02201, Encountered the symbol ";" when expecting one of the following:
  • * < > + - / ^= | != <= >= <> at, not, between, in, is, like, day, hour, minute, month, second, year

But interestingly enough I can run the command in SQL plus and it works as expected. Does anyone have any suggestions for me? I'm running Oracle 10.2.0.

Best regards,
Brian St. John Received on Mon Nov 03 2008 - 15:51:52 CST

Original text of this message