I need to use the last character of a string G. How do I get it with sql server?
SET @VALOR = '0000050529-G'
I want to get the letter G
I need to use the last character of a string G. How do I get it with sql server?
SET @VALOR = '0000050529-G'
I want to get the letter G
Use the function RIGHT()
it returns the N character (s) to the right, the amount is informed by the second argument.
SET @VALOR = RIGHT('0000050529-G', 1)