Need help in creating a function which removes characters(alphabets) only from end or till a number comes at the right.
For Eg :
select fnStripRightAlpha('ABCD123F') --Should Return 'ABCD123'
select fnStripRightAlpha('PORT123G67KK') --Should Return 'PORT123G67'
select fnStripRightAlpha('123465') --Should Return '123465'
select fnStripRightAlpha('ABCDG') --Should Return ''
I saw functions which remove all alphabets, but they do not solve my purpose as only rightmost characters are to be stripped.
Any Ideas?