Split value based on character

I'm trying to write a SQL script without create a new column to storage footnote. How can I separate data based on letter a, b, c, and d:

columnA  footnote
0.0002a      a
0.3b            b
000c           c
0.333      
0.343d        d
....

I know this script is incorrect, but you get an idea what I'm trying to do:

Select columnA, rtrim(columnA, 1) as footnote from table

Thanks,
maheflin25Asked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
try this...

regexp_substr(columnA,'[a-d]$')
0
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
If you have more than letter or string of letters:

select regexp_substr(columnA,'[a-z]+$') from tab1;
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.