Red Gate forums :: View topic - GO capitalization issues
Return to www.red-gate.com RSS Feed Available

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

GO capitalization issues

Search in SQL Prompt Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
Oliwa



Joined: 11 Jan 2007
Posts: 28

PostPosted: Wed Aug 11, 2010 5:53 pm    Post subject: GO capitalization issues Reply with quote

GO never seems to capitalize. If I type "g" and hit ENTER or TAB it capitalizes...but not if I type the word "go" and then hit ENTER. This is odd because it works with other keywords.
Back to top
View user's profile Send private message
chriskelly



Joined: 19 Apr 2010
Posts: 327
Location: Cambridge, UK

PostPosted: Thu Aug 12, 2010 6:46 pm    Post subject: Reply with quote

Can you go to the SQL Prompt Options (through the SQL Prompt menu) and look at the Format->Case page. Are all the options set to UPPERCASE?
Back to top
View user's profile Send private message
Oliwa



Joined: 11 Jan 2007
Posts: 28

PostPosted: Thu Aug 12, 2010 11:25 pm    Post subject: Reply with quote

Yes, all options are set to uppercase. All other keywords capitalize as expected. If I type a "g" and hit ENTER it inserts "GO", and if I type "select" and hit TAB it capitalizes, but not "g".

And I have TAB and ENTER set as activation keys.
Back to top
View user's profile Send private message
chriskelly



Joined: 19 Apr 2010
Posts: 327
Location: Cambridge, UK

PostPosted: Fri Aug 13, 2010 9:53 am    Post subject: Reply with quote

Through some limited testing I have found that this seems to happen when the preceding statement has not been terminated by a semi-colon (Wink.

for example:
SELECT * FROM Person.Address
go

would instead come out as:
SELECT * FROM Person.Address;
GO

is this the case with your situation?
Back to top
View user's profile Send private message
Oliwa



Joined: 11 Jan 2007
Posts: 28

PostPosted: Fri Aug 13, 2010 4:21 pm    Post subject: Reply with quote

I tried what you suggested and whenever I had very simple scripts the capitalization worked fine, but I know I have scripts where "go" doesn't capitalize. I will respond with more information when I encounter the behavior again.
Back to top
View user's profile Send private message
Oliwa



Joined: 11 Jan 2007
Posts: 28

PostPosted: Fri Aug 20, 2010 7:35 pm    Post subject: Reply with quote

I think I found a reproducible scenario...

This is just one of the scenarios I found where go is not capitalized. There are others, but sometimes they work and other times not.

If I declare a variable and type go afterward it capitalizes like so...

Code:

DECLARE @var INT;{ENTER}
go{ENTER}


Now if I try putting in a USE statement before or after the batch go does not capitalize...

Code:

USE master;{ENTER}
go{ENTER}

DECLARE @var INT;
GO

USE master;{ENTER}
go{ENTER}


But if I type "g" and hit ENTER it works.
Back to top
View user's profile Send private message
chriskelly



Joined: 19 Apr 2010
Posts: 327
Location: Cambridge, UK

PostPosted: Mon Aug 23, 2010 3:09 pm    Post subject: Reply with quote

To begin with when I tried to reproduce your example all of the 'go's capitalised as it should.

However, I tried creating a new stored procedure to see if one named with 'go' could affect sql prompt. I named mine 'go_home' containing a very simple select statement. After creating it, I retried your example and that was when I got the results that you describe.

Can you confirm for me whether you have a stored procedure (or any other object) that could be interfering in this way? If you do, can you try dropping it and then re-testing your example. Do you get the same results?
Back to top
View user's profile Send private message
Oliwa



Joined: 11 Jan 2007
Posts: 28

PostPosted: Tue Aug 24, 2010 8:19 pm    Post subject: Reply with quote

I do not have any objects starting with "go". Next time it happens I'll see if there is any objects named similarly.
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