tom tom - 2 months ago 35
SQL Question

Bring up toad intellisense

When typing a query in Toad it usually brings up an intellisense scrolling box to help with my typing.

But sometimes this does not appear. Is there a short cut (like in Visual Studio) to bring it up?

EDIT I found that the key mapping is CTRL+.

For a query like

SELECT * FROM Person AS P
WHERE P. -- I expect intellisense to show me the columns.
-- Sometimes it does not and pressing the CTRL+. does nothing


Pressing CTRL+. away from a query brings up a very long list of things like -


@@CONNECTIONS @@CPU_BUSY @@CURSOR_ROWS @@DATEFIRST @@DBTS @@ERROR


Do I have the correct shortcut key?

Is the problem that Toad can't figure out the column names in the query above?

EDIT 2

Very strange behavior

If I have

USE DB1
SELECT * FROM Person AS P
WHERE P.--I get the intellisense


BUT if I have the following in the editor -

USE DB1
SELECT * FROM Person AS P
WHERE P.--I get the intellisense

USE DB2
SELECT * FROM Company AS C
WHERE C. -- No intellisense


Solution below in my own answer

tom tom
Answer

It seems if there is a second USE on the page intellisense will not work with queries below the second USE!

If I have

USE DB1
SELECT * FROM Person AS P
WHERE P.--I get the intellisense

BUT if I have the following in the editor -

USE DB1
SELECT * FROM Person AS P
WHERE P.--I get the intellisense

USE DB2 
SELECT * FROM Company AS C
WHERE C. -- No intellisense

It seems if there is a second USE on the page intellisense will not work with queries below the second USE!