How do I remove the far right character of the records in a column and then add it to a new column?

I have a column called STATUS in my table TBL_APP, within the STATUS column are a series of characters for each record:

APP         STATUS
118957    ACE
119654    CED
114567    ME
119872    MDA
120487    A

I would like to pull the far right character and create a new column with it, so the table would look like this:

APP         STATUS
118957    E
119654    D
114567    E
119872    A
120487    A

Any thoughts?

danmcd0913Asked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
update tbl_app set status = substr(rtrim(status),-1)

or

update tbl_app set status = substr(trim(status),-1)
0
 
sdstuberCommented:
update tbl_app set status = substr(status,-1)
0
 
danmcd0913Author Commented:
I'm getting a lot of records with nothing in them, is there an easy way to remove the spaces before i execute the above script?
0
 
danmcd0913Author Commented:
AWESOME!  Thank you!  This is exactly what I was looking to do.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.