A new feature in Oracle SQL Developer version 4.0 offers to address grammatical issues with your SQL statements. We call these indicators ‘Semantic Analysis Info Tips.’
The easiest way to see one of these ‘tips’ is to try out your favorite sql statement in a worksheet:
SELECT * FROM scott.emp;
Accessing the ‘Tip’
Place your mouse over the red squiggle line indicator…
Once the tip is available, you can invoke the grammar ‘fix’ by clicking on the hyperlinked text. You can undo the change using your standard UNDO, e.g. Ctrl+Z in Windows.
The ‘explode *’ info tip works for one or more tables in your SELECT – try it out!
What Other Things Can It Advise Me On?
Remember the ‘Auto Group By’ feature? Well that’s been replaced by a semantic info analysis tip. Don’t remember?
If you need to add a GROUP BY, we’ll help you – no more ‘Automatic’ adding it to your query. I find this VERY nice. The ‘automatic’ behaviors in an IDE tend to annoy the more experienced developers, so making this an ‘on demand’ feature should prevent the tool from getting in your way.
We’ll add more of these grammar checks going forward. If you have ideas, please share!
I hate this, how do I turn it off?
It’s in the preferences – disable it on the Code Editor page.
I have a hard time seeing the grammar squiggle
The mark up ‘lines’ and ‘squiggles’ are configurable!
Open the Preferences and go to the PL/SQL Syntax Colors page under ‘Code Editor.’ You’ll want to look for the ‘Disconnected Join Graph’ entry.
I’ll be publishing more 4.0-related posts over the next few weeks. Be sure to check back here often to learn more about our newest version of SQL Developer!
16 Comments
Hi,
On SQLDeveloper 18.3 for Mac, setting this flag made SQLDeveloper use up to 700% CPU and eventually failing to respond, for some Select statements (only for some).
Please share one of the SQL statements so we can track it down. Or even better, log a bug with My Oracle Support via a Service Request.
Hi Jeff
Is there a way to assign a keyboard shortcut to semantic analysis? I would like to be able to go to the text with the squiggly lines and do something like Ctrl->Space for Completion Insight to pull up the dialog for semantic analysis.
Thanks
no, but we probably should for folks w/o a mouse
Yes. I have been using keyboard shortcuts more and more. I think it would be a nice addition. Another one for the never ending enhancement list 🙂
Is the ‘disconnected by join graph’ error bugged? It seems to be complaining for no apparent reason honestly.
http://stackoverflow.com/questions/20242329/sql-developer-disconnected-from-the-rest-of-the-join-graph
Are you on DB2? I would just ignore any feedback we give for something that’s not Oracle or TimesTen
that happens to me on ORACLE
and i couldn’t solve it
Hi jeff,
as a mentioned in the webcast this week, the analyzer seems to have problems with some kind of statementens. i’ve postet a screenshot of an example here https://dl.dropboxusercontent.com/u/25663382/2013-08-22%2009_27_24-Oracle%20SQL%20Developer%20-%20Datenbanken.jws%20_%20IdeConnections%2523LCHZLman001_pluto.jpr%20.jpg
maybe it’s already fixed in the ea2
Hi Jeff,
This looks like a really nice feature, but it’s not working for me.
I have the “Enable Semantic Analysis Info Tip” turned on, but I don’t get the orange grammar squiggle. Are there any other settings that conflict with this one?
Tim, that’s not much for me to go on in terms of helping you debug what’s going on.
Are you connected to a database?
What is your query? Is it completely formed? Can you execute it?
Maybe you could send me a screenshot of your worksheet?
Jeff, toggling the setting on and off, and then starting a new worksheet solved the issue.
I’ve now found issues with caching the columns;
create table th_col
(col1 number);
–tooltip works
select *
from th_col;
alter table th_col add col2 number;
–tooltip above disappears
–tooltip not appearing
select *
from th_col;
[Get a new worksheet]
–tooltip displays col1 but not col2
select *
from th_col;
Excellent work!
Now, can you post this to our forums?
The squiggle tip while doing a ‘select *’ seems like a quicker way of viewing the columns in table than a DESCRIBE (at least in my case)!
By the way, do you think it would be a good idea to add some sort of a scrollbar in the tip which displays the columns? Some tables, especially in Oracle EBS, do have a huge number of columns and in such cases the complete list of columns in the tip cannot be viewed on the screen.
PS: Hope you had a great holiday!
Sujoy,
That’s an interesting take, I hadn’t thought of it in that exact application. I would think where numcols > SomeBigNumber, to just show the first X characters and then use an ellipsis…but in your use of the feature, that would defeat the purpose.
I think you should post this to the forums and see what others think…maybe instead of a vertical scroll bar the info tip should go wider for easier reading?
BTW, I had a GREAT holiday – thanks!
The select * info tip is currently buggy when you query multiple tables – that’s already been fixed for the next build, EA2.