Wrong Suggestion Inserted

MikeyCMikeyC Posts: 249 Bronze 3
edited September 7, 2010 12:54PM in SQL Prompt Previous Versions
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.
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:
SELECT 
	*,
	COUNT(DROP INDEX <cursor>
FROM msdb.dbo.backupfile

when I should end up with:
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.

Comments

  • Anu DAnu D Posts: 876 Silver 3
    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
  • MikeyCMikeyC Posts: 249 Bronze 3
    Nope, I can't do that as I am using SSMS 2005, so there is no Intellisense to turn off.
  • MikeyCMikeyC Posts: 249 Bronze 3
    Have you had a chance to try to replicate this yet?
  • Anu DAnu D Posts: 876 Silver 3
    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 DAnu D Posts: 876 Silver 3
    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
  • MikeyCMikeyC Posts: 249 Bronze 3
    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.
Sign In or Register to comment.