Red Gate forums :: View topic - Seeing too many suggestions in 6.4.0.206
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 6
SQL Prompt 6 forum

Seeing too many suggestions in 6.4.0.206

Search in SQL Prompt 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Fri Jun 27, 2014 5:25 pm    Post subject: Seeing too many suggestions in 6.4.0.206 Reply with quote

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 *
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 *
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]
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 241
Location: Red Gate Software

PostPosted: Fri Jun 27, 2014 5:52 pm    Post subject: Reply with quote

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":

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.
Back to top
View user's profile Send private message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Fri Jun 27, 2014 6:31 pm    Post subject: Reply with quote

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.



As you can see from the image, I have
Code:
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.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 241
Location: Red Gate Software

PostPosted: Mon Jun 30, 2014 8:27 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 241
Location: Red Gate Software

PostPosted: Thu Jul 10, 2014 11:16 am    Post subject: Reply with quote

Hi Jim,

This should be fixed in the latest beta build, if not let me know!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group