Quantcast
Channel: Welcome To TechBrothersIT
Viewing all articles
Browse latest Browse all 1878

How to find data with Carriage Return in string in SQL Server

$
0
0

Scenario:


You are working as SQL server DBA and you have a table Test with column Name , you need to find if Name column contain any data which has carriage return, how would you find string with carriage return in SQL Server?

Solution:

You can use below sql statement to find our carriage return in SQL Server.

Select Name From dbo.Test
where Name like '%'+char(13)+'%' or Name like '%'+char(10)+'%'

Viewing all articles
Browse latest Browse all 1878

Trending Articles