Print Thread
Page 1 of 2 1 2
Comment (?) causing AutoSelect statement to fail
#56706 06/29/17 11:39 AM
Joined: Apr 2016
Posts: 55
M
Martins Offline OP
Member
OP Offline
Member
M
Joined: Apr 2016
Posts: 55
Error: ORA-00900: invalid SQL statement AutoSelect statement Comment

Code (Used to be longer but I deleted everything that didn't make the error disappear):
/*
*/
SELECT 1 FROM dual;
--
SELECT 1 FROM dual;


I have the cursor in the 2nd SQL statement and use F8 to execute it.

I have the option "AutoSelect statement" checked and it looks like it selects more than just the SQL statement but also the comment before but not entirely (just one of the dashes).
See in the picture:
[Linked Image from i.imgur.com]

The thing is - it happens only sometimes - more than once per day. I reopen the file and keep working with it like nothing happened - no errors.

I just switched from 11.0.6.1776 to 12.0.3.1821. On 11 it happened not very often - once per week. But on 12 it is too often to tolerate.

Last edited by Martins; 06/29/17 11:42 AM.
Re: Comment (?) causing AutoSelect statement to fail
Martins #56710 06/30/17 09:03 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
I cannot immediately reproduce this. We'll investigate.


Marco Kalter
Allround Automations
Re: Comment (?) causing AutoSelect statement to fail
Marco Kalter #56712 06/30/17 12:54 PM
Joined: Apr 2016
Posts: 55
M
Martins Offline OP
Member
OP Offline
Member
M
Joined: Apr 2016
Posts: 55
Yes, unfortunately I haven't got a solid test scenario.

Usually the files I work with are about 300 - 1000 lines with several comments, SQLs and anonymous plsql blocks.

Re: Comment (?) causing AutoSelect statement to fail
Martins #56713 06/30/17 01:26 PM
Joined: Jan 2013
Posts: 52
Greece
A
Member
Offline
Member
A
Joined: Jan 2013
Posts: 52
Greece
I have also the same problem. A lot of times (but i cannot reproduce it) it seems like the autoselect is shifted one character to the right.

For example, a couple of minutes ago I had these statements:

COMMIT;

SELECT period, COUNT(1)
from livload.udm_mob_liuos a
GROUP BY period;

I put the cursor over the word count and the statement that was executed (and highlighted) was

ELECT period, COUNT(1)
from livload.udm_mob_liuos a
GROUP BY period;

The highlighted text was extended to the first character of the empty row, exactly below of the statement.

I'll upload a screenshot as soon as this happens again, for sure several times a day. If I save the file and re-open it, the problem disappears, as well as if I copy the whole stuff to a new SQL Window

Aris

Last edited by Arky; 06/30/17 01:26 PM.
Re: Comment (?) causing AutoSelect statement to fail
Arky #56728 07/04/17 09:14 AM
Joined: Jan 2013
Posts: 52
Greece
A
Member
Offline
Member
A
Joined: Jan 2013
Posts: 52
Greece
Here is an image that demonstrates the error :

[Linked Image]


Last edited by Arky; 07/04/17 09:17 AM.
Re: Comment (?) causing AutoSelect statement to fail
Arky #56729 07/05/17 07:08 AM
Joined: Apr 2016
Posts: 55
M
Martins Offline OP
Member
OP Offline
Member
M
Joined: Apr 2016
Posts: 55
Yes, today I had the same problem even when there was no "--" cooment before my SQL. It just took the statement without the first character " S". Just like Arky said.

Re: Comment (?) causing AutoSelect statement to fail
Martins #56758 07/14/17 07:58 AM
Joined: Apr 2016
Posts: 55
M
Martins Offline OP
Member
OP Offline
Member
M
Joined: Apr 2016
Posts: 55
This problem is annoying me every day, every hour. Please hurry smile

Re: Comment (?) causing AutoSelect statement to fail
Martins #56788 07/19/17 07:47 AM
Joined: Apr 2016
Posts: 55
M
Martins Offline OP
Member
OP Offline
Member
M
Joined: Apr 2016
Posts: 55
Today I got the same error when there was no comment involved at all. It just omitted the "SELEC" part of "SELECT":
[img]https://imgur.com/a/i50IN[/img]
https://imgur.com/a/i50IN

Adding images to posts is a pain in the ass frown

Re: Comment (?) causing AutoSelect statement to fail
Martins #56789 07/19/17 08:15 AM
Joined: Apr 2016
Posts: 55
M
Martins Offline OP
Member
OP Offline
Member
M
Joined: Apr 2016
Posts: 55
Just a hint: Maybe it is somehow related to window type switching. I'm using "Change Window to" > Program Window, Command Window, SQL window.
Not exactly with the file I'm having problems, but with other opened files.

Re: Comment (?) causing AutoSelect statement to fail
Martins #56868 08/03/17 03:07 PM
Joined: Jan 2013
Posts: 52
Greece
A
Member
Offline
Member
A
Joined: Jan 2013
Posts: 52
Greece
Only solution - workaround so far:

Ctrl-A
Ctrl-X
Ctrl-V

(it works..)

Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.103s Queries: 15 (0.030s) Memory: 2.5624 MB (Peak: 3.0425 MB) Data Comp: Off Server Time: 2024-05-18 12:01:13 UTC
Valid HTML 5 and Valid CSS