Toad World® Forums

Toad for DB2 LUW v6.1.0604 - Incorrectly Flagging SQL Statement in Code Block

The following is the beginning of a code block. Toad will flag the P_DATE data type as " line 4, col 16: Incorrect syntax near ‘DATE’ " and place the red squiggly under the word DATE. It should be noted that this issue is always the second declared variable regardless of what it is (assuming it is syntactically correct). And it has been this way for at least the last several years. Another item to note is that if there are legitimate errors later in the code block Toad will flag them; however, in the Message window Line and Position will always point to the issue in the image, not the actual error position.

example.jpeg

Are you only entering an anonymous block of code in the editor?

Toad should work fine if that block is within a procedure definition as shown below:

But Toad does not support anonymous blocks of SQL at this time - we have an enhancement request opened for that and that support will be considered in a future release.

Thanks Jeff. Can I get clarification on what you mean by “ Toad does not support anonymous
blocks of SQL at this time ”? I run begin/end blocks of SQL in the Editor all the time and it works fine. It’s the easiest way to use DB2 procedure logic without having to
create a procedure. I was just pointing out Toad’s behavior on non-errors.

Richard Chouanard, analytics consultant

DB2 Database Administrator

*Payment Operations Management/Float Datamart

*Ph: 480-724-2142

From: Jeff Podlasek [mailto:bounce-Jeff_Podlasek@toadworld.com]

Sent: Wednesday, March 04, 2015 7:29 AM

To: toaddb2beta@toadworld.com

Subject: RE: [Toad for IBM DB2 - Beta Discussion Forum] Toad for DB2 LUW v6.1.0604 - Incorrectly Flagging SQL Statement in Code Block

RE: Toad for DB2 LUW v6.1.0604 - Incorrectly Flagging SQL Statement
in Code Block

Reply by Jeff Podlasek

Are you only entering an anonymous block of code in the editor?

Toad should work fine if that block is within a procedure definition as shown below:

But Toad does not support anonymous blocks of SQL at this time - we have an enhancement request opened for that and that support will be considered in a future release.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for IBM DB2 - Beta
notifications altogether.

Toad for IBM DB2 - Beta Discussion Forum

Flag
this post as spam/abuse.

Toad does have limited support for anonymous blocks as Toad will run blocks delimited with BEGIN and END tags in the SQL editor. Toad has limits that it treats the block contents as a single transaction so if there is a DB2 error - the cursor will be located at the beginning of the block if you double-click the error message on the message tab below in the results pain.

Thanks Jeff, that makes sense. Hopefully full support is not too far away.

Richard Chouanard, analytics consultant

DB2 Database Administrator

*Payment Operations Management/Float Datamart

*Ph: 480-724-2142

From: Jeff Podlasek [mailto:bounce-Jeff_Podlasek@toadworld.com]

Sent: Thursday, March 05, 2015 1:01 PM

To: toaddb2beta@toadworld.com

Subject: RE: [Toad for IBM DB2 - Beta Discussion Forum] Toad for DB2 LUW v6.1.0604 - Incorrectly Flagging SQL Statement in Code Block

RE: Toad for DB2 LUW v6.1.0604 - Incorrectly Flagging SQL Statement
in Code Block

Reply by Jeff Podlasek

Toad does have limited support for anonymous blocks as Toad will run blocks delimited with BEGIN and END tags in the SQL editor. Toad has limits that it treats the block contents as a single
transaction so if there is a DB2 error - the cursor will be located at the beginning of the block if you double-click the error message on the message tab below in the results pain.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for IBM DB2 - Beta
notifications altogether.

Toad for IBM DB2 - Beta Discussion Forum

Flag
this post as spam/abuse.