Toad World® Forums

How to find line number with syntax error in large PL/SQL stored procedure submitted via Toad


#1

When I submit large PL/SQL stored procedures via ‘CREATE PROCEDURE’ and there is a syntax error in the code, DB2 always returns Line #1 as the offending line. I have to peruse the entire code block to find the syntax error. Is there an easier way to find the exact statement in Toad that caused the error?


#2

Have you tried clicking the error in messages tab of the result window? Toad can’t always determine the syntax error location, but when it can the location can be navigated to by clicking the message. Also, you will see the location in the “line” and “position” column of the messages tab.


#3

Yes, I tried that, because the entire Stored Procedure is considered as one line, it always goes to line 1, not very helpful. The line and position column always shows as line 1, position 0.


#4

What version of Toad are you using?


#5

Toad for DB2 5.04.731 is the version I’m using


#6

The latest release 5.5 has enhancements that should make error navigation better. Please try a trial or upgrade.


#7

The Toad for DB2 5.6 beta worked on finding the line that had an error in a large SQL/PL stored procedure.