March 20, 2018 at 10:34 am
I'm a long time Data Developer and have been using SSMS quite heavily since 2005. I've never had an issue using formatting tools like Redgate's SQL Prompt, SQL Smash and others but for some reason in SSMS 2017 my table DDL format is garbage. I've been working with someone at RedGate for weeks and we can't get anything to work. I've also tried other formatting tools so I have to believe this is an issue with SSMS itself and something with the tab formatting. What you see in the image below is what any table I try to format so that the data types are all aligned to the right of the column names just comes back with ragged formatting. I obviously want the NOT NULL options to be to the very far right and aligned down the same column but nothing close is happening.
Has anyone seen this and is there something in the SSMS settings I can configure? I've spent a lot of time messing around with the tab formatting but just can't find anything to resolve this.
Thanks
March 20, 2018 at 11:06 am
hans.johnson - Tuesday, March 20, 2018 10:34 AMI'm a long time Data Developer and have been using SSMS quite heavily since 2005. I've never had an issue using formatting tools like Redgate's SQL Prompt, SQL Smash and others but for some reason in SSMS 2017 my table DDL format is garbage. I've been working with someone at RedGate for weeks and we can't get anything to work. I've also tried other formatting tools so I have to believe this is an issue with SSMS itself and something with the tab formatting. What you see in the image below is what any table I try to format so that the data types are all aligned to the right of the column names just comes back with ragged formatting. I obviously want the NOT NULL options to be to the very far right and aligned down the same column but nothing close is happening.
Has anyone seen this and is there something in the SSMS settings I can configure? I've spent a lot of time messing around with the tab formatting but just can't find anything to resolve this.
Thanks
I have SSMS 2017 & SQL Prompt and I do not experience what you are seeing, so I don't think that this is a general problem.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 20, 2018 at 11:20 am
So here's a perfect example. If I take this DDL code I created on my own and go into SQL Prompt and select the INDENTED format which should really do nothing to this format it looks like what you see far below.
March 20, 2018 at 11:42 am
Not using your format style, but when I put in your sample in a ragged format then did a ctrl-k ctrl-y this is what I got:
CREATE TABLE [TestTable] (
[TestTableKey] INT NOT NULL
, [Test1] INT NULL
, [Test2] VARCHAR(2) NOT NULL
, [Test3] INT NOT NULL
);
March 20, 2018 at 1:56 pm
Oddly enough I've figured out the issue. It's a font issue. As I was using Arial I guess there must be an issue with that particular font and I'd imagine others because when I switched back to Courier New everything formatted perfectly and as I would suspect. Thank you for the help!
March 20, 2018 at 2:02 pm
hans.johnson - Tuesday, March 20, 2018 1:56 PMOddly enough I've figured out the issue. It's a font issue. As I was using Arial I guess there must be an issue with that particular font and I'd imagine others because when I switched back to Courier New everything formatted perfectly and as I would suspect. Thank you for the help!
Arial is most likely a proportional space font, that would explain the problem you were having.
March 20, 2018 at 2:05 pm
hans.johnson - Tuesday, March 20, 2018 1:56 PMOddly enough I've figured out the issue. It's a font issue. As I was using Arial I guess there must be an issue with that particular font and I'd imagine others because when I switched back to Courier New everything formatted perfectly and as I would suspect. Thank you for the help!
Did you hit this on a Windows 10 PC? There were a ton of font issues after different updates - I think most were with the Creators update. Some were with MS fonts, not just third party ones that they decided to block.
Sue
March 21, 2018 at 11:33 am
hans.johnson - Tuesday, March 20, 2018 1:56 PMOddly enough I've figured out the issue. It's a font issue. As I was using Arial I guess there must be an issue with that particular font and I'd imagine others because when I switched back to Courier New everything formatted perfectly and as I would suspect. Thank you for the help!
Yes, Arial is a proportional spaced font and Courier New is monospaced. You should be able to select any monospaced font for your code window without an issue.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply