Red Gate forums :: View topic - Wrong Suggestion Inserted
Return to www.red-gate.com RSS Feed Available

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

Wrong Suggestion Inserted

Search in SQL Prompt Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
CodantiM



Joined: 29 Jun 2007
Posts: 180

PostPosted: Wed Aug 25, 2010 5:29 pm    Post subject: Wrong Suggestion Inserted Reply with quote

I am running version 4.0.4.21 and have found that in some case SQL Prompt will insert a suggestion other than I have selected.

Code:
SELECT
   *,
   COUNT(DI<cursor>
FROM msdb.dbo.backupfile


If at that point I hit ctrl-space, and then scroll down to DISTINCT and hit TAB I end up with:

Code:
SELECT
   *,
   COUNT(DROP INDEX <cursor>
FROM msdb.dbo.backupfile


when I should end up with:

Code:
SELECT
   *,
   COUNT(DISTINCT<cursor>
FROM msdb.dbo.backupfile


I don't understand why it is inserting the snippet even though I scrolled down and selected a different suggestion.
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 663
Location: Cambridge

PostPosted: Thu Aug 26, 2010 11:41 pm    Post subject: Reply with quote

Thank you for your post regarding SQL Prompt.

Can you kindly check if SQL Server 2008 intellisense is switched off as SQL Prompt and SSMS native intellisense don't go along?

You can turn off SQL Server 2008 intellisense using the following settings:

Open Tools>Options>Text Editor>Transact-SQL>Intellisense. Is Intellisense disabled here?

Also if you click General under the Transact-SQL list is Auto list members and Parameter information not selected?

Kindly restart management studio after saving this settings and recheck it and try reproducing the issue?

Kindly let me know if this fixes the issue.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
CodantiM



Joined: 29 Jun 2007
Posts: 180

PostPosted: Fri Aug 27, 2010 12:53 am    Post subject: Reply with quote

Nope, I can't do that as I am using SSMS 2005, so there is no Intellisense to turn off.
Back to top
View user's profile Send private message
CodantiM



Joined: 29 Jun 2007
Posts: 180

PostPosted: Wed Sep 01, 2010 5:35 pm    Post subject: Reply with quote

Have you had a chance to try to replicate this yet?
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 663
Location: Cambridge

PostPosted: Tue Sep 07, 2010 10:23 am    Post subject: Reply with quote

Apologies for the delay in replying you.

I was able to replicate the issue and hence logged in as a bug in our internal tracking system whose tracking id is SP-3405

Workaround for this issue is to select the word 'DISTINCT' from the suggestion box and double click to select it.

Kindly let me know if this helps.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
Anu Deshpande



Joined: 20 Apr 2009
Posts: 663
Location: Cambridge

PostPosted: Tue Sep 07, 2010 10:40 am    Post subject: Reply with quote

Also you can use 'Enter' to insert the DISTINCT instead of DROP INDEX.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
CodantiM



Joined: 29 Jun 2007
Posts: 180

PostPosted: Tue Sep 07, 2010 5:54 pm    Post subject: Re: Reply with quote

Anu Deshpande wrote:
Also you can use 'Enter' to insert the DISTINCT instead of DROP INDEX.


That would work if I used Enter as a completion key, which I don't. The double clicking does work though.
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