4

I had a sql that had some error. Although the error says

SQL Error [42601]: ERROR: syntax error at or near "from"
  Position: 420

. However, it seems dbeaver didn't highlight exactly where the error is. It tells me it is position 420, but i don't know where is position 420 intuitively....

Is it possible to let DBeaver to highlight error for me.

PS: I could identify the error by eyeballing this time... but other times seem difficult...

enter image description here

0

4 Answers 4

2

With this option activated dbeaver it will show you a red marker on the line that contains the error.

With this option activated dbeaver it will show you a red marker on the line that contains the error.

0
5

I'm not sure the accepted answer is correct. Normally I'd go into Window | Preferences | Editors | SQL Editor | Code Editor and turn on the option Show problem markers.

DBeaver | Preferences | Editors | SQL Editor | Code Editor | Option: Show problem markers

Tooltip: Shows individual markers near the failed queries and highlights the problematic segment of it in the editor. if disabled, selects the problematic segment in the editor.

1

In this case, your problem is you have a comma at the end of db4_open, right before the FROM clause. Remove that comma and the query will not have that error. Some query GUIs have the ability in an Options page to turn on line numbers. Not sure if that is the case for this tool or not.

0
0

enter image description here

I think, just turn on the "Show line numbers" in preferences

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.