Error interpreting sql statements with blank lines
See original GitHub issueHello, this topic was treated in this thread: http://dbeaver.jkiss.org/forum/viewtopic.php?f=2&t=669, although I don’t know how to solve it.
This is a silly example (with postgres):
select *
from objeto;
returning this error:
SQL Error [42601]: ERROR: error de sintaxis en o cerca de «from»
Position: 1
In Window->Preferences->Editors->SQL Editor->SQL Processing, Statement delimiter is set ;
but I don’t found anything about don’t use blank lines as statement delimiter too.
Is it possible ignore blank lines as statement delimiter?
It is very useful when writing multiples PL procedures in the same script because I separate some of its code with blank lines to be more readable, and I want to execute only one of this statements (execute as statement not as script).
In Oracle sqlplus/sqldeveloper, the character / is used to specify the end of statement (function, trigger, anonymous block, etc).
Regards.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Will be added in the next version
Currently statement execution command (ctrl+enter) threats blank lines as statement delimiter. At the moment there is no workaround for that. Mostly because some databases works that way. Also because it is simply convenient. But you can select your statement (with any number of blank lines/special characters inside) and execute it (ctrl+enter). Also you can execute it as script (alt+x) - in this case only statement delimiter (; by default) will be used as delimiter.
I could add some additional config option (like “Use blank line as statement delimiter”) for SQL processing… WDYT?