You can use the LEFT function to retrieve all but the final character of a string. For example, if your string variable is @str, you can delete the final character using the following code:
SET @str = LEFT(@str, LEN(@str) - 1)
This sets @str to a substring of itself, starting at the first character and ending at the second-to-last character, effectively removing the final character.
Asked: 2023-06-24 03:37:42 +0000
Seen: 12 times
Last updated: Jun 24 '23