MS SQL MS - Trim Trailing Spaces (not in the data...)
-
I am using Microsoft SQL Server Management Studio 2005 v9.00.4035.00. When I view an existing stored procedure and copy the text or grid results to a new query window there are always several spaces after each line, and in some cases a ton of extra space. Before I commit any modifications to the stored proc I have to take the text into a text editor and trim the trailing spaces (okay, I guess I don't HAVE to but it just annoys me). I was wondering if anyone has a better method of accomplishing this goal. I can't seem to find anything in options or any plugins I can install that will do this. Every time I try and Google this all I get is results on how to trim trailing spaces from the dataset you are returning. Thanks in advance for your help!
-
I am using Microsoft SQL Server Management Studio 2005 v9.00.4035.00. When I view an existing stored procedure and copy the text or grid results to a new query window there are always several spaces after each line, and in some cases a ton of extra space. Before I commit any modifications to the stored proc I have to take the text into a text editor and trim the trailing spaces (okay, I guess I don't HAVE to but it just annoys me). I was wondering if anyone has a better method of accomplishing this goal. I can't seem to find anything in options or any plugins I can install that will do this. Every time I try and Google this all I get is results on how to trim trailing spaces from the dataset you are returning. Thanks in advance for your help!
Is you output datatype TEXT or CHAR, you may want to look at VARCHAR.
-
Is you output datatype TEXT or CHAR, you may want to look at VARCHAR.
-
Thanks for your response on this however I am not referring to any output that I can control the datatype of. I am referring to the text that SMS brings up when you view an existing stored proc or view.
Okay I see what you mean... I have not had a big problem with this as I usually have no trailing characters. There might be a setting about trailing characters, but I cannot remember. Sorry I cannot help. djj