Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

reuse query results tab when using DEFINE statements

Felipe_SFMar 31 2017 — edited Apr 3 2017

I'm trying to parameterize the FROM and SELECT clauses in some scripts that I use, and run them from SQL Developer, but getting the output in the worksheet grid to make it easier to read, not on the script output window. A simplified query:

UNDEF FROM

--DEF FROM=DBA_HIST_SQLSTAT

DEF FROM=v$sqlstats

SELECT *

FROM &&FROM

WHERE ROWNUM=1;

I have uncheck the following options:

Database => Object Viewer => Automatically Freeze Object Viewer Windows

Database => Worksheet => Show query results in new tabs

However every time I run it using Ctrl+Enter, I get a new tab for the results. If I select just the query without the DEFINE statements, the same tab is reused.

How can I make SQL Developer to reuse the same tab when I also include DEFINE statements?

This post has been answered by Gary Graham-Oracle on Mar 31 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2017
Added on Mar 31 2017
4 comments
673 views