Toad World® Forums

Execute Snippet Shift+F9


#1

When I try to execute a sql statement within some pl/sql using Shift+F9 it tells me I have an invalid table name. When I copy that sql so that it is not embedded in pl/sql it will run. When I comment out ( /* code */ ) the pl/sql and just leave sql statement I am trying to execute it will work. It is only when I try to Shift+F9 that it won’t work.

I have already gone to my Toad Options - Toolbars/Menus – Shortcuts and Reset all. And, I have the latest version 12.6.0.53.

Any suggestions to get this working?

Thanks


#2

Enabled SQL spooling from the Database|Spool SQL menu. Spool it to screen. Reproduce your problem and look at the spooled SQL. What is Toad sending to Oracle and does that differ from what you expect?

On 01/20/2015 04:04 PM, vle wrote:

Execute Snippet Shift+F9

Thread created by vle
When I try to execute a sql statement within some pl/sql using Shift+F9 it tells me I have an invalid table name. When I copy that sql so that it is not embedded in pl/sql it will run. When I comment out ( /* code */ ) the pl/sql and
just leave sql statement I am trying to execute it will work. It is only when I try to Shift+F9 that it won’t work.

I have already gone to my Toad Options - Toolbars/Menus – Shortcuts and Reset all. And, I have the latest version 12.6.0.53.

Any suggestions to get this working?

Thanks

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#3

This is the result from spooling to the screen:

Session: XXX@xx.xxxxx

Timestamp: 14:14:00.893

Error: ORA-00903: invalid table name

However, I realized I was using ANSI-SQL and I changed my joins and it works. I have been using ANSI-SQL for years. Is there a setting someplace to enable ANSI-SQL?


#4

It should just work. If you send me a reproducible sample to michael.staszewskiquest.com I’ll take a look. Also indicate exactly where within the SQL your caret is located. I tried with this example and it works as expected.

declare
n number;
begin
SELECT COUNT (*)
FROM EMP E INNER JOIN DEPT D ON (E.DEPTNO = D.DEPTNO);
end;

On 01/20/2015 04:16 PM, vle wrote:

RE: Execute Snippet Shift+F9

Reply by vle

This is the result from spooling to the screen:

Session: XXX@xx.xxxxx

Timestamp: 14:14:00.893

Error: ORA-00903: invalid table name

However, I realized I was using ANSI-SQL and I changed my joins and it works. I have been using ANSI-SQL for years. Is there a setting someplace to enable ANSI-SQL?

To reply, please reply-all to this email.

Stop receiving emails on this subject.
Or Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.


#5

By the way, you can scroll up in the Spool SQL Output to see your query. It will be displayed before the error.


#6

It seems to work when joining 2 tables but when I add a 3rd table is when I am getting the error.


#7

Thanks, I see. I’ll log a bug. Unfortunately there is no workaround.

On 01/20/2015 04:45 PM, vle wrote:

RE: Execute Snippet Shift+F9

Reply by vle
It seems to work when joining 2 tables but when I add a 3rd table is when I am getting the error.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#8

I did scroll up and I only have the 3 lines. It doesn’t display my query only the error.


#9

Thank you!!! Any chance of being notified when this bug is fixed?


#10

I’ve added a note to post back to this thread when done. Hopefully I’ll see it when I fix it. :slight_smile:

On 01/20/2015 04:54 PM, vle wrote:

RE: Execute Snippet Shift+F9

Reply by vle
Thank you!!! Any chance of being notified when this bug is fixed?

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#11

I see what you mean about the query not showing. I’ll fix that.


#12

Thanks for your quick response.


#13

Thanks for your quick response, too.


#14

I have attempting to use Shift+F9 and have been unsuccessful with using it. When I try to execute a snippet of code it only works with Ctrl+Enter. How can I correct this. I am using the same version however it is the Base Edition without any add ons


#15

This was fixed in a recent beta.