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.


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

enter image description here

| improve this answer | |
  • 1
    I've checked but no result. Still space instead tab. – Andrey Jul 13 '16 at 8:34
  • 1
    Close existing tab and open new one. – Paweł Tajs Jul 13 '16 at 9:14
  • That's a completely unintuitive option if the goal is retaining tabs!! (Not your fault, of course...) – RonJohn Jun 15 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.