Add NewLine in SQL Query:
Code:
Declare @FristName Char(10) Declare @LastName Char(10) Set @FristName = 'Venu' Set @LastName = 'Thomas' Select (@FristName + CHAR(13) + CHAR(10)+ @LastName) As Name |
OutPut:
Name
———————-
Venu
Thomas(1 row(s) affected)
Remove NewLine in SQL Query:
Code:
Declare @FristName Char(5) Declare @LastName Char(10) Declare @strName Char(15) Set @FristName = 'Venu' Set @LastName = 'Thomas' Set @strName =@FristName + CHAR(13) + CHAR(10)+ @LastName Select Replace(Replace(@strName, CHAR(13), ''), CHAR(10), ',') As Name |
OutPut:
Name
————
Venu ,Thomas
(1 row(s) affected)
Tags: SQL
what goes up, must come down?
I am surprised at the things I overlooked before I read this post. Thanks for the good information.
I am shocked at the items I overlooked before I read this post. Thanks for the great information.