The below TSQL script removes the Tab, Line feed, Carriage Return characters in a string:
SET NOCOUNT ON
DECLARE @String VARCHAR(100)
DECLARE @CorrectedString VARCHAR(100)
SELECT @String = 'ARUN KUMAR
LADHA'
PRINT @String
SELECT @CorrectedString = REPLACE(@CorrectedString, CHAR(13),'')
PRINT @CorrectedString
SELECT @CorrectedString = REPLACE(@CorrectedString, CHAR(10),'')
PRINT @CorrectedString
SELECT @CorrectedString = REPLACE(@String, CHAR(9),'')
PRINT @CorrectedString
SET NOCOUNT ON
DECLARE @String VARCHAR(100)
DECLARE @CorrectedString VARCHAR(100)
SELECT @String = 'ARUN KUMAR
LADHA'
PRINT @String
SELECT @CorrectedString = REPLACE(@CorrectedString, CHAR(13),'')
PRINT @CorrectedString
SELECT @CorrectedString = REPLACE(@CorrectedString, CHAR(10),'')
PRINT @CorrectedString
SELECT @CorrectedString = REPLACE(@String, CHAR(9),'')
PRINT @CorrectedString
No comments:
Post a Comment