5.3.6.28: No prompts for simple script

PDinCAPDinCA Posts: 642 Silver 1
Having added a list of DECLAREd variables to my 17-line script, shown below, I expect SQL Prompt to prompt me with a variable if I double-click the literal 116 in the exec and type @ variables. This is SO BASIC it's near unbelievable that v5 doesn't perform the simplest of its tasks...

SSMS2012 build 11.0.3339.0 - Windows 8 Pro build 6.2.9200.

Ctrl+D was forlornly a long shot - made no difference.

Is the declare list throwing it off? Are the declared values included in the list throwing it off?

If this isn't already a case, please add one...
USE xcp_XXXX
GO
begin tran
DECLARE @SiteID         int         = 116
      , @TagID          int         = 1441
      , @StartTime      datetime    = '4/1/2013'
      , @EndTime        datetime    = '5/1/2013'
      , @IntervalCode   varchar(5)  = 'RMI'

go
EXEC dbo.usp_GetAggregation @SiteID = 116 , @TagID = 1088
   , @StartTime = '2013-04-10 19:33:00', @EndTime = '2013-04-10 19:38:00'
   , @IntervalCode = 'RMI'
   , @DEBUG=1
go
rollback
go
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Many thanks for your post.

    What happens when you comment 'Go' 10th line that is the 'Go' just before EXEC key word?

    Does SQL Prompt suggest the variables after that?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • PDinCAPDinCA Posts: 642 Silver 1
    Scope would appear to be the issue but having commented the go out, double-clicked 116, typed @S I get nothing at all by way of prompting. If I Ctrl+Space I get the variables, but I shouldn't have to do that...
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
  • Anu DAnu D Posts: 876 Silver 3
    Thanks for your reply PDinCA.

    That is how prompt is supposed to behave.

    When you are typing the query that's when SQL Prompt keeps automatically prompting but when you are trying to replace a word (by double clicking) and want a code completion suggestion it needs to be manually triggered by (Ctrl + Space).

    If you want this behaviour to be changed please feel free to add this feature to our Uservoice.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • PDinCAPDinCA Posts: 642 Silver 1
    Stunning that having been a user of SQL Prompt since version 2 I assumed it would be smart enough to prompt whenever I typed! Intelliview appears to be smarter.

    Guess I'll have to suggest that it do that...

    What's more strange is that if I type "SELECT * FROM x" I get a pick list, so I duly select the database and it's auto-filled. If I then DOUBLE-CLICK the database and immediately type "x" I get a pick list! And I didn't have to Ctrl+space to get it!

    So, what it boils down to is that SQL Prompt exercises "situational compliance" with my double-click-type-and-expect-a-pick-list demands.

    Perhaps you can now see why I consider the original post to highlight a BUG.

    I would venture to suggest that SQL Prompt be made CONSISTENT. It is VERY typical for developers to double-click, type, and expect a pick list. Would you register a case, please, as a bug, and fix it? Maybe while you're at it you'd give an option for this kind of expected behavior (by some) to be "normal" or "inactive", so nobody is upset.

    Thanks.
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
Sign In or Register to comment.