Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

DB2-L - Probleme mancher Tools mit Common Table Expressions (WITH-Syntax)

Subject:

[v9 z/OS] DSNTIAUL and CTE

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

DB2 List <db2-l@lists.idug.org>

Date:

2011.07.21 07:27:00


Thank you, very good.

When I designed my program, I had the need to know if the statement is SELECT or
UPDATE / INSERT / DELETE even before issuing the PREPARE, so I checked the first
word. This ran fine until the CTEs appeared :-(

Kind regards

Bernd



Am 21.07.2011 01:20, schrieb J.C.:
> Just for the record, DSNTIAUL only checks for statements that need to be executed by static
> SQL. Everything else it just PREPAREs and then checks the SQLDA - if there are no output
> columns it EXECUTEs the statement; otherwise it is OPEN, FETCH,... CLOSE.
>
> It doesn't even search for the end of SQL statements - it depends on the SQLCODE +98 on
> the prepare to tell it where one statement ends and the next starts. (Don't use DSNTIAUL to
> CREATE VIEWs. The entire SQL text, including all text past the semi-colon, is stored in
> SYSVIEWS.TEXT.)
>
> J.C.
>

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie