Seeing too many suggestions in 6.4.0.206
JimF
Posts: 49 Bronze 3
I have begun to notice that I have been seeing too many suggestions in my intellisense. For example, I have a table "dbo.Committees" (which yields an alias of "c"), a view called "dbo.CurrentCommittees" (which yields an alias of "cc"), and finally a view called "dbo.CurrentCommitteesEntityTypes" (which yields an alias of "ccet"). So far, all as expected.
But, if I type
Then, if I type
Both of those views do contain the table "dbo.Committees", so I don't know if that makes a difference, but since I can't reference a table in a join, I shouldn't see those suggestions.
I think this started when I started using the beta, but I can't be 100% on that.[/i]
But, if I type
Select * From dbo.CurrentCommittees As cc Where ...I am presented table aliases from "c." and "cc." along with their respective columns even though I am not joining to that other object.
Then, if I type
Select * From dbo.CurrentCommitteesEntityTypes As ccet Where ...I am presented table aliases from "c." and "ccet." along with their respective columns even though I am not joining to that other objects.
Both of those views do contain the table "dbo.Committees", so I don't know if that makes a difference, but since I can't reference a table in a join, I shouldn't see those suggestions.
I think this started when I started using the beta, but I can't be 100% on that.[/i]
Comments
I'm looking into this now, but I don't think I'm seeing the same suggestions you are. I've created the table and views you mentioned and in the first example I just get suggestions from ".cc":
Can you think of anything else that I might need to do to recreate this?
One option that might also affect this is under Options->Suggestions->Behavior->Types of suggestions->"List all database columns after a SELECT statement" - so just double check to make sure that is unticked.
Thanks,
Aaron.
So I poked around a bit more and noticed that it does not always repro, but I can make it do it when the correct conditions are met.
Basically, I need to have another select statement in the query window to make it happen.
As you can see from the image, I have in my query window. Oh, and you have to type the first "c" to make it show up. Without the query there, it behaves as it should. Hope that helps.
It looks like it suggests aliases if they have been typed exactly. I think this is a knock on from our fixes for aliases not being resolved correctly if there are script errors between their use and definition (which is pretty common if you're still typing the script). I'll have a look into what we can do about a fix.
Edit: Just a quick update on this, we think we've got a fix however it needs a bit of restructuring on how we calculate the suggestions if we want to keep our previous fixes. We should hopefully have something out in the beta next week - I'll let you know when it's up.
This should be fixed in the latest beta build, if not let me know!