Re: Pro*C compile hassle

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Tue, 14 Dec 1999 08:09:33 -0500
Message-ID: <3856418D.14F654E3_at_Unforgettable.com>


Clint Eastwood wrote:
>
> HiYa
>
> I am trying to mix embedded SQL and PL/SQL in the same module, and I am
> getting error messages that don't make sence, looking at the output
> below, the identifier ORDERS is a table, and this is in SQL and compiled
> fine (and worked) when I didn't have the PL/SQL in there.
>
> what am I doing wrong??
>
> Ohhh BTW I find that I can get a compile if I remove the SQL and leave
> only the PL/SQL, and have the PL/SQL of :
>
> EXEC SQL EXECUTE
> DECLARE
> myDate DATE;
> BEGIN
> myDate := sysdate;
> END;
> END-EXEC;
>
> I can't select into myDate from dual!!
>
> INFAC2::<DEV>[EASTWOC.ROS_DEV] proc tester.pc; SQLCHECK=FULL
>
> Pro*C/C++: Release 2.2.3.0.0 - Production on Tue Dec 14 17:46:57 1999
>
> Copyright (c) Oracle Corporation 1979, 1996. All rights reserved.
>
> System default option values taken from: ora_proc20:pmscfg.cfg
>
> EXEC SQL SELECT ordr.provider_order_num,
> ...1
> (1) PCC-S-02201, identifier 'ORDERS' must be declared
>
> EXEC SQL SELECT ordr.provider_order_num,
> ...1
> (1) PCC-S-02000, SQL Statement ignored
>
> Semantic error at line 116, column 5, file tester.pc;:
> EXEC SQL SELECT ordr.provider_order_num,
> ...1
> (1) PCC-S-02346, PL/SQL found semantic errors
>
> FROM dual;
> .....................1
> (1) PCC-S-02201, identifier 'DUAL' must be declared
>
> SELECT to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
> ..........1
> (1) PCC-S-02000, SQL Statement ignored
>
> Semantic error at line 166, column 9, file tester.pc;:
> BEGIN
> .......1
> (1) PCC-S-02346, PL/SQL found semantic errors

It does no good to show the error message if you do not show the source code.

.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
.............................................................................
v Received on Tue Dec 14 1999 - 14:09:33 CET

Original text of this message