How to read string from right PLSQL

FMiS Help Desk picture FMiS Help Desk · Feb 27, 2012 · Viewed 12.9k times · Source

In a table column, I have this value:

DV-2011-01-000004 (the data type is varchar2)

How can i get the part of the string '000004'? In t-sql they have this right() function but in PL SQL i cant'seem to find a function just like the right() in t-sql.

Thanks for the help.

Answer

turbanoff picture turbanoff · Feb 27, 2012
substr('DV-2011-01-000004', length('DV-2011-01-000004')-6 + 1 )