home / software / tips and tricks / How to Remove Newline Tab Character in Data using SQL Server

How to Remove Newline Tab Character in Data using SQL Server

Updated:  02/08/2011 11:02 AM
Author:  Shiju Mathews

Status:    Resolved.


Here’s how you can remove/replace the Newline characters in your data



The CHAR() string function converts an ascii code to character and can be used to insert control characters into strings. Over here we are using three types of control character

CHAR(9) - Tab
CHAR(10) – LineFeed
Char(13) - CarriageReturn

A newline or line break is CHAR(13) + CHAR(10). In the code shown above, we look for all Newline and Tab characters and replace it with a ‘_‘ and ‘’ respectively.

Tags: How to Remove Newline Tab Character in Data using SQL Server
Updated on: October 2024