Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 

 

img6.pngnumber of characters needed from the starting position

SUBSTR ((string, start, count), Assume RPT-001027 is a string; I want to pick out 1027, One is located in 7th position and followed 4 characters (count) needed, SYNTAX:   selec SUBSTR  ('RPT-001027',7,4)   AS RETURN-VALUE FROM DUAL;

RESULT :

 

RETURN-VALUE

 

1027

 

 

11.17   How to use LTRIM( )

function

 

When we need to remove left most unwanted or to be eliminated characters on the column we need to use the following syntax:

Syntax:  select ltrim(',aaa,bbb,',',') as result from dual;

 

Result :

 

Result

 

- - - - - aaa,bbb,