Wrong Suggestion Inserted

Provides intelligent code completion for SQL Server editors.

Moderators: David Atkinson, Anu Deshpande, Luke Jefferson

Wrong Suggestion Inserted

Postby CodantiM » Wed Aug 25, 2010 5:29 pm

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 all
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 all
SELECT
   *,
   COUNT(DROP INDEX <cursor>
FROM msdb.dbo.backupfile


when I should end up with:

Code: Select all
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.
CodantiM
 
Posts: 182
Joined: Fri Jun 29, 2007 2:07 am

Postby Anu Deshpande » Thu Aug 26, 2010 11:41 pm

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
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby CodantiM » Fri Aug 27, 2010 12:53 am

Nope, I can't do that as I am using SSMS 2005, so there is no Intellisense to turn off.
CodantiM
 
Posts: 182
Joined: Fri Jun 29, 2007 2:07 am

Postby CodantiM » Wed Sep 01, 2010 5:35 pm

Have you had a chance to try to replicate this yet?
CodantiM
 
Posts: 182
Joined: Fri Jun 29, 2007 2:07 am

Postby Anu Deshpande » Tue Sep 07, 2010 10:23 am

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
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby Anu Deshpande » Tue Sep 07, 2010 10:40 am

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
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Re:

Postby CodantiM » Tue Sep 07, 2010 5:54 pm

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.
CodantiM
 
Posts: 182
Joined: Fri Jun 29, 2007 2:07 am


Return to SQL Prompt Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests