Tuesday, May 28, 2019

Trim characters from a string in oracle


  • For trimming characters from last 



select  substr('Trim_India_1', 0, length('Trim_India_1')-2) from dual;

Result: Trim_India



  • For trimming characters from starting 



select  substr('Trim_India_1', 3) from dual;

Result: im_India_1

This will return all characters starting from position 3

No comments:

Post a Comment