Home Dashboard Directory Help
Search

SQl Server Management Studio should show new lines in records. by Michael Freidgeim


Status: 

Closed
 as Won't Fix Help for as Won't Fix


8
1
Sign in
to vote
Type: Suggestion
ID: 381955
Opened: 11/14/2008 4:09:14 AM
Access Restriction: Public
0
Workaround(s)
view

Description

If there are newLines characters in the record data, SQl Server Management Studio in Grid view shows the record as one string, without indication that newlines are present.
It causes confusion to the user, invalid interpretation of the data and even data loss.See scenario in my post http://geekswithblogs.net/mnf/archive/2008/11/13/sql-server-management-studio-doesnt-show-new-lines-in-records.aspx
It will be good if newLines will be shown as actual new lines(consistent with SQL Server 2000 Enterprize Manager) or as some special character(e.g \n or |) to inform user.
Ideally method on new line presentation could be configured in Tools/Options/Query Results/SQL Server/Results to Grid.

2.By the way, separate suggestion: make Results to Text Maximum Length of the output default to 8192 (rather than 256) to avoid truncations, that are not obvious.
Details
Sign in to post a comment.
Posted by pwhe23 on 4/29/2013 at 8:38 AM
I think "SSMS is not really intended to be a reporting tool" is a ludicrous statement. It is the number one way that developers have to view the data *as it is in the database*. When your response is that it is totally ok for it to mangle the data displayed from the database, that gives me *no* confidence in this tool. Your workarounds are completely inconvenient, especially when the poster's suggestion of printing "\r\n" would easily solve the problem since then a trivial find-replace could display the data correctly and visually we could *see what is actually in the database*.
Posted by Mark Guinness on 7/27/2012 at 12:20 PM
This behavior has changed in SSMS 2012, possibly as a consequence of it now using the Visual Studio 2010 shell.
Posted by Michael Freidgeim on 5/31/2011 at 2:42 PM
I want to suggest to add your explanation into SSMS documentation and possibly as tool-tip.
For example if grid cell has new line inside or truncated due to the length, put the warning into tooltip.
People(in particular not-experienced in DB developers) keep to use SSMS as a reporting tool, and this non-intuitive behavior is confusing.
Posted by Microsoft on 5/31/2011 at 7:33 AM
Hi Michael,

This is related to the connect item 381955. We evaluated the feedback carefully and are able to reproduce the cases you listed. However because of the following reasons we are unfortunately not able to attend to this request:

1. new lines in grid
When using the results to grid option, we use the standard Windows grid control to display the results. This grid control treats each cell value as a plain text and hence the new line characters are ignored. The Save as function when executed from the results section just takes the content from the grid as it is and hence the newline is not found in the new file created from the grid. However if you use the results to text option or the results to file the new line characters are retained. SSMS is not really intended to be a reporting tool, so we are unable to spend much time on the result formatting, especially if some work arounds exist like mentioned above.

2. Max characters when using results to text
The number specified here is used to preallocate memory for the text column data. A larger value for default could mean lot of un-necessary memory being allotted but not used. Hence it is left to the user to increase the value based on their needs.

I hope the above sounds reasonable. I am currently closing the issue as a wont-fix. However in case there is anything not mentioned previously please let us know and we will surely take a relook.

thank you

Seshagiri
PM, SSMS
Sign in to post a workaround.