How do I remove the last character in a string in T-SQL?
T-SQL
For example:
\'TEST STRING\'
to return:
\'TES
This will work even when source text/var is null or empty:
SELECT REVERSE(SUBSTRING(REVERSE(@a), 2, 9999))