Right-Aligning Numbers In Management Studio

Daniel Hutmacher has a trick to right-align results in SQL Server Management Studio:

Here’s something I’ve found: the space character is roughly about half the width of a typical number character. So replace every leading space with two spaces, and it will look really neat in the grid:

Click through for the script.  This one goes near the back of the toolbelt, but it can come in handy when trying to troubleshoot values by eyeball and without Excel.

Related Posts

File Growth Rate Under 1MB

John Morehouse shows that the file growth rate GUI for Management Studio doesn’t report values under 1MB correctly: While I was recently,  doing a review of a client’s environment I discovered that the GUI can lie to you when it comes to the database file growth rates.  By default, the data file is set to […]

Read More

SSMS Default File Encoding

Claudio Silva shows how to make UTF-8 the default file encoding for SQL Server: The file that is used to create a new query window has ANSI encoding but when I save the file on the PowerShell script I save it as UTF-8 because the client have comments on the code with unicode characters. On […]

Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

June 2018
MTWTFSS
« May  
 123
45678910
11121314151617
18192021222324
252627282930