TSQL formatting doesn't match source code

  • Hey all,

    Opening a given .sql objects in any tool besides SSMS results in the expected formatting that the TSQL was written in. Yet as soon as I open them within SSMS 2012 or 2014 or copy/paste, the formatting is wrong. It's odd that the issue doesn't exist in 2008 R2 SSMS though nor does the issue exist anywhere else besides my local.

    See attached. Any thoughts?

    Thanks!

  • It most likely is a tab size problem.

  • Hi djj, thanks for the prompt response. Can you please elaborate on that a little further?

    Thanks!

  • In the Tools\Options\Text Editor\Transact-SQL\Tabs see what the tab size is.

    Look in your text editor and see what it thinks a tab is.

  • djj (11/5/2014)


    In the Tools\Options\Text Editor\Transact-SQL\Tabs see what the tab size is.

    Look in your text editor and see what it thinks a tab is.

    Nice! You're right, my local SSMS 2012/2014 has tab size set to 5; whereas my 2008 R2 as well as any other installation in my environment has it set to 4.

    Any thoughts on how or why that was changed? I certainly know I didn't.

    Thank you!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply