Toad World® Forums

Invalid SQL runs

This SQL runs and returns data - with any number of closing parentheses.

SELECT *
FROM DUAL
WHERE (1 = 1))))

Thanks.

-Charlie

Hi Charlie,

Thank you for your feedback, PT#53521299 has been raised for it, thanks.

Shirly

Hi Charlie,

This issue has been fixed and will be applied in next drop, thank you again for your feedback.

Thanks,

Shirly

Hi Charlie,

Thanks again for your feedback. This issue has been fixed and applied in our latest beta 2962 now.

You can download and have a check from:

www.toadworld.com/…/19982.aspx

Any issue please let us know, thanks.

Thanks,

Shirly

This is kind of fixed. Pressing F9, it fails, as it should. But, if you put the SQL on multiple lines, and press F8, it runs:

SELECT *
FROM DUAL
WHERE (1 = 1))

This same SQL will fail with F8 if it is on a single line:

SELECT * FROM DUAL WHERE (1 = 1))

This one intrigued me, so I decided to try it. As Charlie noted, it fails as bad sql with execute (f9), but runs despite the extra parenthesis on execute step (f8).

It gets a little more interesting because it actually only runs using F8 if the cursor is on one of the first two lines. If the cursor is in the where clause, it correctly gives the invalid sql error.

It will run using F8 with the cursor in the last line only when you remove the extra parenthesis.

And yes, I have 2962 installed.

Peter S

Hi Charlie and Peter,

Thank you very much for your feedback. I can see the same issue with F8 in our latest beta build 2962, PT#55232158 has been raised for it. Will let you know once we fix.

Thanks again,

Shirly