I am writing a query in Oracle.
I want to get a string from the right hand side but the string length is dynamic.
Ex:
299123456789
I want to get 123456789
substr(PHONE_NUMBERS,-X,Y)
X is different for each record.
I tried this:
substr(PHONE_NUMBERS,-length(PHONE_NUMBERS),Y)
and it didn't work..
How can I write this query?
Thanks.