Uppercase SQL script using SSMS

I just realised I use this functionality a lot and thought that others might not know it was possible.

Highlight a lower case bit of text in the SQL editor window of SSMS and press CTRL+SHIFT+U and the text will go to upper case (L for lower case).

SQL Upper case

This is handy when someone else has written a SQL script with GP field names in lower case as I’m so used to them in upper, it speeds up my reading to make them upper.

This is just an example. You may also highlight the whole script and make it upper case or individual lines, the above GIF is just showing the principle. In this particular case it would be quicker to have made the whole lot upper case then go back and lower case the table aliases.

Comments (2) -

  • Hi Tim

    You should be using UPPERCASE as that matches the case of the tables and columns.

    Matching what is already used is very important if you want your code to work on both DOCI and Binary SQL systems.

    David
    • This is just a feature of the text editor in SSMS to upper/lowercase text. Makes the GP table and field names more familiar in the SQL. I'm not really talking about he field values here where I think the sort order of the server would then come into play?

      I may have missed your point though, or you may have missed mine?

Add comment

Loading