Reputation: 23
It appears that the latest SQL Server SSMS v18.8 is replacing non-printing characters with blanks in the grid output. This was addressed for v2008 in this question, and it noted that it was fixed in v2012. Does anyone know of an option to restore the v2012 behavior in v18.8?
If you execute this query in v18.8 you get "aN-blank-b":
select 'a'+Char(78)+Char(9)+'b'
If you run the same query in v2012 you get "aN-tab-b". The tab is included in the text and file output in both versions.
Upvotes: 2
Views: 82
Reputation: 95557
It appears that if you get the tab or not is linked to the Retain CR/LF on copy or Save setting, however, only if you restart SSMS after enabling it.
Firstly, enable the setting via Tools -> Options -> Query Results -> SQL Server -> Results to Grid -> Retain CR/LF on copy or Save.
Then close SSMS, and then reopen it. When you copy and paste the value, you then get a tab.
Animated GIF of this "feature" occuring:
Upvotes: 4