4

SSMS 2016 changing tabs to spaces when copying from Result Tab (does not matter ctrl+c or drag&drop). For example if execute this code

SELECT 'a' + CHAR(9) + 'b'

then copy text from result tab and paste in any editor it will be space instead tab between 'a' and 'b' characters.

How to prevent this behaviour?

P.S.: Saving result to CSV working properly and saving tab (code 9). Error caused only on copying.

1 Answer 1

4

Go to Options and check Retain CR/LF on copy or save.

enter image description here

4
  • 2
    I've checked but no result. Still space instead tab. Commented Jul 13, 2016 at 8:34
  • 2
    Close existing tab and open new one. Commented Jul 13, 2016 at 9:14
  • That's a completely unintuitive option if the goal is retaining tabs!! (Not your fault, of course...) Commented Jun 15, 2020 at 7:03
  • Or use SSMS and Output to Text? Commented Mar 27, 2024 at 9:30

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.