Compilation error when compiling Pro*C code


 
Thread Tools Search this Thread
Top Forums Programming Compilation error when compiling Pro*C code
# 1  
Old 04-02-2009
Compilation error when compiling Pro*C code

I'm running a query similar to the one that I'm describing below -:
_______________________________
EXEC SQL INSERT INTO TABLE1
( C1
,C2
,C3
,C4 )
(SELECT DISTINCT B.V1
,B.V2
,( SELECT D.V3 FROM TABLE2 D WHERE D.V3 = C.V4)
,B.V4
FROM TABLE2 B ,TABLE3 C
WHERE B.V3 = C.V4) ;
_________________________________
Above query runs perfectly on SQL prompt.
Same query, when being run in a Pro*C program
gives compilation error-:
Error at specified line
,( SELECT D.V3 FROM TABLE2 D WHERE D.V3 = C.V4)
.............................1
PCC-S-02201, Encountered the symbol "D" when expecting one of the following:
( ) * + - / . @ | at, day, hour, minute, month, second, year,
_____________________________________
What are the possbile causes of error. I am using Oracle 10g on Unix. Help needed urgently.
Thanks a lot!
# 2  
Old 04-02-2009
The Pro*C precompiler uses a different parser than does sqlplus. This happens every once in a while - the best work around is reformulate the query.

You can try changing the sqlcheck setting of Pro*c to be full, but you have to supply a username/password as well eg: userid=username/password.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Source code compilation

Need assistance in Source code compilation . When installing a software compiling a source code . Whatever the output that prints on the screen i want to log it into a file. How can i see output and store the output to file ./configure make make install Is there other way of seeing output... (5 Replies)
Discussion started by: ajayram_arya
5 Replies

2. UNIX and Linux Applications

Pro*c file Compiling Issue in suse Linux

The existing .pc (pro *C) file is running successfully in UNIX. But when Iam trying to compile this same file in LINUX using proc iname filename.pc, Iam getting an error, proc file not recognized. Could someone help how to generate execute file from the proc*c file. what are the prerequisites... (2 Replies)
Discussion started by: vikrambharat
2 Replies

3. UNIX for Advanced & Expert Users

Error when compiling with the pro-c

Gentlemen, I can not compile with the Pro-C installed on a Solaris 10. I get the following error ..: ! Compilation: startdmn.pc ------------------------------------------------------------------ ld.so.1: proc: fatal: libclntsh.so.9.0: open failed: No such file or directory make: Fatal... (2 Replies)
Discussion started by: Pedro_Oca
2 Replies

4. Programming

Compiling Pro*C program under unix

Hello, I am trying to compile a Pro*C program under unix: proc iname=test.pc works fine but then I am not able to compile the test.c file : gcc test.c -o test.o -L $ORACLE_HOME/lib -l clntsh /usr/bin/ld: Object file format error in: /u01/app/oracle/product/10.1.0.2.0/lib:... (1 Reply)
Discussion started by: nsmrmd
1 Replies

5. UNIX for Advanced & Expert Users

Problem on Pro*C compilation on HP-UX

Hi, This is my first post to this forum. I have been facing a strange compilation error message. When I try to make a pro*C file on HP-UX ( uname -a shows HP-UX aopc7449 B.11.11 U 9000/800 2416083493 unlimited-user license), ::: Linking... /usr/ccs/bin/ld: profls.o: Not a valid object file... (5 Replies)
Discussion started by: asutoshch
5 Replies

6. AIX

Pro C Compilation problem

Hi, I have AIX 5.3 and my code is written in proc . i am getting following error during compilation Please help?////..... :-d: Compiling with RMS cc -w -q32 -qidirfirst -ISource/Header -I/usr/vacpp/include -q32 -DRMS -DDISEC -DDBG -DBIGENDIAN -DBIT32 -c -q32... (0 Replies)
Discussion started by: ajaysahoo
0 Replies

7. Programming

compilation parameters, code optimization

Hi all, I implemented an application, through using c++ and compiled it with g++. At first, what I did is (@ compilation): g++ calcBacon.C -o test -DDEBUG after I ran my application it took almost 120 sec. to finish its execution when I compiled with optimization parameters, execution... (5 Replies)
Discussion started by: SaTYR
5 Replies

8. Shell Programming and Scripting

Pro*c compilation error

Hi, Recently our codes have been migrated to new server, whenever we compile any pro*c programs we receive the following errorl. please help >> make -f lib_util.mk all CC= ucbcc 4Compiling lib_util ### command line files and options (expanded): ### -xO3 -DNULL=0 -v -o lib_util.o... (1 Reply)
Discussion started by: satvd
1 Replies

9. Programming

pro*c compilation error

Hi, Recently our codes have been migrated to new server, whenever we compile any pro*c programs we receive the following errorl. please help >> make -f lib_util.mk all CC= ucbcc 4Compiling lib_util ### command line files and options (expanded): ### -xO3 -DNULL=0 -v -o lib_util.o... (0 Replies)
Discussion started by: satvd
0 Replies

10. Programming

Error message of compiling a C code

Hi, Recently I have a C Code and i compile on my pc with gcc -D _t_1 -o a.out test.c It works fine for me on my pc. However, upon transferring the same code on Sun Solaris server, it breaks with the below message:- Undefined first referenced symbol ... (3 Replies)
Discussion started by: ahjiefreak
3 Replies
Login or Register to Ask a Question