Seeing too many suggestions in 6.4.0.206

Provides intelligent code completion for SQL Server editors.

Moderators: Anu Deshpande, Aaron Law, David Priddle

Seeing too many suggestions in 6.4.0.206

Postby JimF » Fri Jun 27, 2014 5:25 pm

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
Code: Select all
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
Code: Select all
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]
JimF
 
Posts: 20
Joined: Tue Jul 08, 2008 7:55 pm

Postby Aaron Law » Fri Jun 27, 2014 5:52 pm

Hi Jim,

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":
Image
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.
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby JimF » Fri Jun 27, 2014 6:31 pm

Yup, it is unchecked.

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.

Image

As you can see from the image, I have
Code: Select all
Select *
From dbo.Committees as c

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.
JimF
 
Posts: 20
Joined: Tue Jul 08, 2008 7:55 pm

Postby Aaron Law » Mon Jun 30, 2014 8:27 am

I can recreate it now, thanks!

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.
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby Aaron Law » Thu Jul 10, 2014 11:16 am

Hi Jim,

This should be fixed in the latest beta build, if not let me know!
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software


Return to SQL Prompt 6

Who is online

Users browsing this forum: No registered users and 0 guests