SSMS: Single column results to text: Regression and nvarchar/varchar inconsistency
SSMS inconsistently space-pads string results for single-column result sets. Varchar-type results are padded to the column alias or maximum display length, but with a minimum width of 4. Nvarchar-type results, on the other hand, are not padded. This is both an inconsistency and a change in behavior from previous versions.
Because of this behavior, it is impossible to produce in the results pane (for cut and paste where needed elsewhere, for example) the exact result of executing one or more single-column string-type selects. Saving results to a file retains the spurious padding.
Upvotes: 5<=-=Jun 30 2008 12:15PM=-=>
The issue is understood in the use scenario. It could be a regression introduced from a fix for right-to-left scripting languages. In column aligned mode, it is by-design but other modes such as comma, tab and space separated modes, it should preserve the original behavior. I will escalate it to the product team.
Program Manager, Microsoft SQL Server
Hi Steve Kass
Thanks for writing in to report this issue. We have added this to our backlog of approved fixes for a future release. I’m resolving as “won’t fix” for accounting reasons on our side.
Sam Hughes (Product group PM)