How to ignore semi colon for multiple queries in editor

Version 14.0.75

Hi,

I used to be able to have two queries in the editor, neither with semi colon, Like this:

select * from table

select * from table2

I could run either query without any issues, now when I try to run either query I get
ORA-00933: SQL command not properly ended.

If I add a semi colon to the end of the first query it will let me run them but how can I have it go back to the way it was, when it wasn't required?

Thanks in advance!

Now, TOAD works as it should in this regard. If you select (highlight) a query, which could be subquery where no semicolon would ever be present, and hit F9, it will run the query without a semicolon. If you just hit F9 on a query at the cursor, it requires a semicolon in the proper place. This is the correct functionality.

I have often complained that TOAD encouraged the submission of invalid code into a code repository, which I have often seen, because it was not strict in requiring semicolons. Now, it works correctly, and it is a good thing. I hope it CANNOT be disabled. Being in the habit of not using semicolons is bad because it is incorrect. SQLPLUS would never let you do that, and TOAD should never have either.

Cheers,
Russ

2 Likes

It's really best to use semicolons and run with F9, but....

If you put the cursor on a sql statement without a semicolon, you can run it with CTRL+Enter. Our parsing isn't as good that way, but it will work as long as blank lines separate your statements.

1 Like

I change the F9 shortcut to run snippet as OP asked for, I prefer that.

Btw changing shortcut with shift pressed makes shift+shift+key, John, perhaps you can repeat that?

Hi Esko,

I'm sorry, I don't understand what you want me to try to repeat.

I understand that you changed your CTRL+Enter shortcut to F9, but I'm not sure what you are getting at with Shift.

Hej,

I realized that it works if you actually click the extra key, so it was a false report.
Sorry to be a bother :wink:

1 Like