[Top][All Lists]

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

Re: esqlOC error

From: James K. Lowden
Subject: Re: esqlOC error
Date: Sun, 14 Nov 2021 15:31:34 -0500

On Mon, 8 Nov 2021 00:53:22 -0500
Michael Potter <> 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

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. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]