Posts

Showing posts with the label string

Removing the First and Last Character From a Table Column in SQL Server 2012

Image
Removing the First and Last Character From a Table Column in SQL Server 2012 . Given below is the script. Different functions to remove characters from string in sql len () left () right () charindex () replace () trim () sunstring () Remove characters from left of stringSSRS 2008R2ExpressionTablix Report from sqldbatask.blogspot.com We can remove part of the string using replace () function. Removes the space character char (32) or other specified characters from the start and end of a string. Set @str = n'this is a sentence with spaces in it.';