Trying to write an SQL Script that will find a carriage return and delete it. When I export the data to excel the carriage return is causing data to go to the next line and into the first field.
WHEN CHARINDEX(CHAR(10), comment) Then
WHEN CHARINDEX(CHAR(13), comment) Then
END AS CheckReturn
Open in new window
Attempting to run the above code I receive error:
Msg 8114, Level 16, State 5, Line 34
Error converting data type varchar to bigint.