I need a new function that has the ability to look from the last character of a string and return a group of characters.
Currently the substring function is available to look for parts of a field value but if the field value character length is inconsistent than the returned value cannot be controlled.
Example:
Tag number 4"-BD-A1-1234_SHT01
Substring (TAG, 17, 2) will return '01'
But if the tag is 10"-FWS-A21-1234_SHT01
Substring (TAG, 17, 2) will return 'SH'
In SQL a LEFT or RIGHT function can be used to find characters either at the Start of End of a string.
Tag number 4"-BD-A1-1234_SHT01
Select RIGHT (TAG, 2) will return 01