No intellisense when using a view multiple times + repro

buckleybuckley Posts: 69 New member
edited March 10, 2014 6:17PM in SQL Prompt
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

Comments

  • Aaron LAaron L Posts: 596 New member
    Hi Buckley,
    I can recreate this locally and will look into a fix for you. Thank you for the awesome repro steps!
  • Aaron LAaron L Posts: 596 New member
    edited March 7, 2014 12:25PM
    I think I've got a fix for you in this build If you'd like to give it a try, and i'll make sure this gets included in the next Prompt release.

    Thanks,
    Aaron.

    Edit: Link removed - changes are in latest stable build
  • buckleybuckley Posts: 69 New member
    Hi Aaron. That's awesome too. I'll check tomorrow morning at work and give prompt feedback.
  • HI! I was wondering the if OP had this issue resolved?

    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
  • Aaron LAaron L Posts: 596 New member
    Hi giangbnguyen,

    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.
  • Aaron, thank you for the prompt reply.

    I was able to download the specific version you mentioned and that did indeed resolve my problem.

    Thanks again!
  • buckleybuckley Posts: 69 New member
    Great to here that!
Sign In or Register to comment.