Skip to content
Advertisement

A better way to get the last character

I have been working in an exercise, I have 2 values (one with 9 characters and the other with 8) and I have to show 3 columns.

  1. The original number
  2. The number without the last character
  3. Only the last character

The Query works but I would like to know a way to improve how I get the last column, I used a Case clause but I think there´s a better procedure to accomplish the same thing. Thank you.

Advertisement

Answer

Consider below few options

with output

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement