How do I remove the last character in a string in T-SQL?
T-SQL
For example:
\'TEST STRING\'
to return:
\'TES
Try this,
DECLARE @name NVARCHAR(MAX) SET @name='xxxxTHAMIZHMANI****'SELECT Substring(@name, 5, (len(@name)-8)) as UserNames
And the output will be like, THAMIZHMANI