No intellisense when using a view multiple times + repro
buckley
Posts: 69 New member
We have pinpointed a problem with the latest version (6.2.0.241) and took the time to come up with an isolated repro
-- problem seems to occur only with views
-- problem occurs when you refer to a view in a following query
-- problem is at with the second select
-- the script is self contained / isolated except for the table "Client" which has to be replace with another table
IF OBJECT_ID('NoIntellisense') IS NOT NULL
DROP VIEW NoIntellisense
GO
CREATE VIEW NoIntellisense
AS
SELECT CLD01_STAANN
FROM Client c
GO
IF OBJECT_ID('NoIntellisense2') IS NOT NULL
DROP VIEW NoIntellisense2
GO
CREATE VIEW NoIntellisense2
AS
SELECT CLD01_STAANN
FROM Client c
GO
-- ************************* Example with views
SELECT *
FROM NoIntellisense ni
WHERE ni.CLD01_STAANN = ''
-- Works fine
SELECT *
FROM NoIntellisense ni2
WHERE ni2.CLD01_STAANN = ''
-- No Intellisense when you type: "ni2."
SELECT *
FROM NoIntellisense2 ni2
WHERE ni2.CLD01_STAANN = ''
-- works fine
-- ************************* Example with tables
SELECT *
FROM Client c
WHERE c.CLD01_STAANN = ''
-- Works fine
SELECT *
FROM Client c
WHERE c.CLD01_STAANN = '' -- Works fine
-- problem seems to occur only with views
-- problem occurs when you refer to a view in a following query
-- problem is at with the second select
-- the script is self contained / isolated except for the table "Client" which has to be replace with another table
IF OBJECT_ID('NoIntellisense') IS NOT NULL
DROP VIEW NoIntellisense
GO
CREATE VIEW NoIntellisense
AS
SELECT CLD01_STAANN
FROM Client c
GO
IF OBJECT_ID('NoIntellisense2') IS NOT NULL
DROP VIEW NoIntellisense2
GO
CREATE VIEW NoIntellisense2
AS
SELECT CLD01_STAANN
FROM Client c
GO
-- ************************* Example with views
SELECT *
FROM NoIntellisense ni
WHERE ni.CLD01_STAANN = ''
-- Works fine
SELECT *
FROM NoIntellisense ni2
WHERE ni2.CLD01_STAANN = ''
-- No Intellisense when you type: "ni2."
SELECT *
FROM NoIntellisense2 ni2
WHERE ni2.CLD01_STAANN = ''
-- works fine
-- ************************* Example with tables
SELECT *
FROM Client c
WHERE c.CLD01_STAANN = ''
-- Works fine
SELECT *
FROM Client c
WHERE c.CLD01_STAANN = '' -- Works fine
Comments
I can recreate this locally and will look into a fix for you. Thank you for the awesome repro steps!
Thanks,
Aaron.
Edit: Link removed - changes are in latest stable build
I just installed the latest SQL Prompt update (v. 6.2.0.366) and my SQL Prompt suggestion box is empty.
I have tried to refresh the suggestion (CTRL+SHIFT+D) with no luck in resolving the empty suggestion box. I also tried changing the ParserLooK "back" and "ahead" distance value in the EngineOption XML with no luck either.
I tried the link from a previous post but the install stops because I have the latest version already.
I am having to resort back to SSMS intellisense in order to get "prompts" with my query objects. I am writing queries against a 2008R2 box with multiple Table value functions being joined together.
Any suggestions on a work around to get the "prompts" back?
TIA
The original issue should be fixed in the latest stable build of Prompt which you've got so I assume you're seeing something else. You could try this private build (6.3.0.235) which has had a few more improvements that might help.
If that build also doesn't work, would it be possible to provide a script where you're not getting suggestions?
Thanks,
Aaron.
I was able to download the specific version you mentioned and that did indeed resolve my problem.
Thanks again!