Red Gate forums :: View topic - 5.3.6.28: No prompts for simple script
Return to www.red-gate.com RSS Feed Available

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

5.3.6.28: No prompts for simple script

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
PDinCA



Joined: 25 Jul 2005
Posts: 516
Location: Costa Mesa, CA, USA

PostPosted: Mon Apr 29, 2013 9:01 pm    Post subject: 5.3.6.28: No prompts for simple script Reply with quote

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:
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
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 692
Location: Cambridge

PostPosted: Wed May 01, 2013 3:07 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
PDinCA



Joined: 25 Jul 2005
Posts: 516
Location: Costa Mesa, CA, USA

PostPosted: Wed May 01, 2013 6:21 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 692
Location: Cambridge

PostPosted: Tue May 07, 2013 4:18 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
PDinCA



Joined: 25 Jul 2005
Posts: 516
Location: Costa Mesa, CA, USA

PostPosted: Tue May 07, 2013 6:30 pm    Post subject: Reply with quote

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.
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