I’m tasked with writing and testing several small PL/SQL scripts. It’s way outside my core competency, but I can do it with enough trial and error. One thing that complicates this process is the error reporting of SQ LDeveloper. It outputs a short description of the problem with a line and column number, but the line number bears no relation to where the error actually is. That is, I might have used = instead of := for assignment on line 52 of my script, but the error in the Script Output window says the problem in on line 37. In that a typical problem? Is there a way of converting the reported line number to an actual one?
I’m using SQL Developer 1.5.5.
I know what you mean. I come across this issue on a daily basis. I still haven’t totally figured out the exact solution but it seems to have something to do with how the compiler handles comments. I just did a test on my machine using a query where I inserted an error on a particular line. The Error at Line: # was off as expected. After removing the commented lines from the SQL the error corresponded to the Line #.
Edit: Adding test case in response to Ian Carpenter
Run then change to:
Run and get following error: