October 6, 2009 at 10:33 am
For example, querying for longest running queries, etc, can use the sys.dm_exec_sql_text function, which returns the text/definition of a query or other code snippet. Those results should contain the appropriate cr/lf, but somehow those are suppressed in the result window of the query. Is there a way to retain those special chacters? I am using 2005.
October 6, 2009 at 11:12 am
when in gridview in SSMS (Control D) the CrLf appear to be supressed. but if you switch to text vie (Control T) and rerun your statement, the CrLf's will be preserved....
the grid view ignores/does not present the CrLf, but they are still there in the data. it's purpose is to present the data in a more compact format, and cannot scroll like a text file in the cell used for presentation, so the app hides them in that mode.
Lowell
October 6, 2009 at 11:40 am
Thanks Lowell. This solution works somewhat. I see that the results get truncated, whereas in the grid view, they are not. Is there a setting that controls how much of the text will display for "Results to Text"?
-- Found that setting in the options. Thanks again.
October 6, 2009 at 11:48 am
it's getting truncated because there is ANOTHER setting to limit the results to 256 chars by fdefault:
go here and change the value to 8000:
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply