Refresh suggestions

Hi Redgate Team,

since the last(?) version the automatic and manual refresh of suggestion is not working properly anymore.
Dropped object are still in the suggestion list (intellisense).

Thanks for looking into this!

Version 9.0.5.3501

Torsten

Best Answers

  • krzysztofkroczakkrzysztofkroczak Posts: 55 Silver 2
    Hi @torsten.strauss,

    I think that refreshing suggestions is still working properly, probably you are in the same script where you've created and deleted something (tables, sps, etc.).
    We add objects to suggestions when we detect a create statement of something.
    We do it like this because otherwise, it would not be possible to give any suggestions in the script as in some sense it's still not invoked and we can't predict what is the real purpose of the user.

    Best regards,
    Krzysztof
  • torsten.strausstorsten.strauss Posts: 266 Silver 3
    Hi Krzysztof!

    Thanks for clarification!
    You are right, the create statement is in the same script.
    I was thinking the suggestion is driven by sys.objects but your approach is smarter.

    Torsten

Answers

  • Hi Krzysztof!

    Maybe I am wrong but the logic considering your approach should be:
    CREATE TABLE t(col1 int)
    -- correct suggestion although the table is not created
    SELECT * FROM t 
    DROP TABLE t;
    -- after dropping the table logically (in the script but no execution) or physically the 
    -- table t should not be listed in the object suggestions anymore
    SELECT * FROM t;
    GO
    

    What do you think?

    Torsten
  • Hi @torsten.strauss ,

    We chatted on the team and we think that some people still want to have that suggestion, because they writing some bigger script and they don't go through one by one statement.

    If you think that it is still valuable to change that behaviour would you mind put it on UserVoice.

    Best regards
    Krzysztof
Sign In or Register to comment.