Re: esqlOC error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 8 Nov 2021 00:53:22 -0500
Michael Potter <pottmi@xxxxxxxxx> wrote:

> I got this error:
> 
> unsupported VAR construction in DECLARE SECTION:
> 
> On this code:
> 
>            EXEC SQL DECLARE D63_A999 TABLE
>            ( VAR1      CHAR(17)        NOT NULL,
...
>            ) END-EXEC.
> 
> What is wrong with that code.
> 
> Original code is from DB2 and the target is postgres.

The esql processor doesn't appear to know what to do with the DECLARE
TABLE statement.  A quick look at esqlOC.cpp (for example) shows the
only DECLARE construct it recognizes is "DECLARE CURSOR".  I wouldn't be
surprised if it simply passes anything unrecognized to the DBMS as
"SQL", and the error message is the server's complaint about the
syntax.  

Since DECLARE table is optional for DB2 and afaik not a feature in
other esql environments, my first guess would be that you'd be better
off with a preprocessor that just deletes them. 

--jkl




[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux