I am switching from SQLDeveloper to DBeaver in my work with Oracle 10G database, have the Oracle instantclient for the exact version of the database.
I do not make scripts, just a bunch of queries, like select, update. I had a collection of them, each on one or few lines, with semicolon at the end, followed by two dashes and comment. Multiple line statements for visual separation separated with lines of many dashes.
SQLDeveloper treated such a system well, CTRL+Enter executed only that line (or group from last comment or semicolon to the next semicolon), ignored comment after or before. So I copied the whole collection from the one programs main window to the other (SQL Editor). Usage results are weird.
Example in new SQL Editor tab (table names changed, so ignore if I got some reserved words):
select * from FILE_MOVEMENT where MOVEMENT_STATUS != 'MOVED' and LAST_UPDATE > sysdate -10 order by LAST_UPDATE desc;--My comment, explanation
select * from ACTIVITY where ACTIVITY_TYPE = 'GENERATOR' and STATUS = 'CREATED' and STARTED > sysdate -10 order by STARTED desc;--My other comment
The first one executes as expected with CTRL+Enter, line start flashes with single triangle and the Execution log shows only my command until the semicolon. But when cursor placed at second line followed by CTRL+Enter, I get triangles before both lines, all after first lines semicolon until second lines end including both comments gets selected and ORA-00911 pops up. The selected text shows up in Execution log.
If I put an empty line between them, then whole second line gets selected and logged and same error pops up.
What to do to stop such behaviour and make the second line also execute same way as first - without previous and next comment? Is there some language or line end or comment settings in DBeaver I have missed?