Oracle Error at Line (PyCharm)

Answered

Another newbie question but please help! Much thanks in advance.

When I run SQL statement for an Oracle database via Oracle SQL Developer and encounter an error, I receive both the Oracle error ID as well as which line in the SQL statement the error is coming from. For example, in the below, I received the "ORA-00904: invalid identifier" error, with error specifically at code line 122, column 19.  

Running the same SQL statement in PyCharm (both via the default Database Console of the PyCharm Professional and via plug-in Database Navigator), I receive the "0RA-00904" error message, but I'm not provided with where the code line with error is. Doesn't seem like the "Position: 4416" displayed in PyCharm is alluding to the error location.  

Oracle SQL Developer

PyCharm

 

0
1 comment

This behavior is correct. The line numbers in (PL/)SQL errors have nothing to do with line numbers in the console. DataGrip only sends the selected (PL/)SQL statement to the DB. The DB has no way of knowing what the line numbers in your console window are, and sends back only char position. SQL Developer make some additional work to parse this value and match it with what you have in editor.

Here is feature request to display correct line for error, please follow and vote.

0

Please sign in to leave a comment.