Pages

Thursday, 10 January 2013

Query to remove first, last character from string in sql server

Syntax to Remove First character from string

SELECT SUBSTRING(ColumnName,2,(LEN(ColumnName))) FROM TABLENAME


Syntax to Remove Last character from string

SELECT SUBSTRING(ColumnName,1,(LEN(ColumnName)-1)) FROM TABLENAME

No comments:

Post a Comment