I'm updating an internal Pro*C application for which the useful new
MERGE statement would be perfect. However the Pro*C preprocessor fails
with an error on the MERGE statement. The statement itself is valid -
it works as expected when executed through a client.
The error is:
"
Pro*C/C++: Release 9.0.1.1.0 - Production on Thu Jul 11 11:48:47 2002
(c) Copyright 2001 Oracle Corporation. All rights reserved.
System default option values taken from:
/opt/oracle/9.0.1.C/precomp/admin/pcscfg.cfg
Syntax error at line 69, column 1, file insertTask.pc:
Error at line 69, column 1 in file insertTask.pc
MERGE INTO TASK t
1
PCC-S-02201, Encountered the symbol "MERGE" when expecting one of the
following:
for, register, at, close, commit, connect, declare, describe,
execute, fetch, open, prepare, rollback, select, whenever,
alter, audit, comment, create, delete, drop, get, grant,
insert, lock, noaudit, rename, revoke, set, update, validate,
arraylen, allocate, cache, call, collection, context,
deallocate, enable, free, lob, object, savepoint, analyze,
explain, truncate,
The symbol "alter," was substituted for "MERGE" to continue.
Error at line 0, column 0 in file insertTask.pc
PCC-F-02102, Fatal error while doing C preprocessing
make: *** [obj/insertTask.c] Error 1
"
This seems to indicate that Pro*C has not been updated to include the
new MERGE statement - it's not in the list of tokens the precompiler
was expecting.
It's also not listed as an embedded SQL statement in the Pro*C
documentation:
http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a89861/pc_02prc.htm#972
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a97269/pc_02prc.htm#972
And it's not been added in Release 2 either.
Other than wrapping the MERGE into a stored procedure and calling
that from Pro*C, is there any way I can use MERGE from Pro*C?
Thanks,
--
Andy Hassall (an...@andyh.org) icq(5747695) http://www.andyh.org
http://www.andyhsoftware.co.uk/space | disk usage analysis tool