5.3.6.28: No prompts for simple script

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

5.3.6.28: No prompts for simple script

Postby PDinCA » Mon Apr 29, 2013 9:01 pm

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 @S. Nothing but three @@ 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...
Code: Select all
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
PDinCA
 
Posts: 512
Joined: Mon Jul 25, 2005 11:42 pm
Location: Costa Mesa, CA, USA

Postby Anu Deshpande » Wed May 01, 2013 3:07 pm

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

Postby PDinCA » Wed May 01, 2013 6:21 pm

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...
PDinCA
 
Posts: 512
Joined: Mon Jul 25, 2005 11:42 pm
Location: Costa Mesa, CA, USA

Postby Anu Deshpande » Tue May 07, 2013 4:18 pm

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

Postby PDinCA » Tue May 07, 2013 6:30 pm

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.
PDinCA
 
Posts: 512
Joined: Mon Jul 25, 2005 11:42 pm
Location: Costa Mesa, CA, USA


Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 0 guests