A retrieval with no third argument: it starts at begin and retrieves the rest of the string : SUBSTR « Character String Functions « Oracle PL/SQL Tutorial






SQL> SELECT SUBSTR('My address is 123 Fourth St.',6) FROM dual;

SUBSTR('MYADDRESSIS123F
-----------------------
dress is 123 Fourth St.

SQL>








11.18.SUBSTR
11.18.1.The SUBSTR Function
11.18.2.substr(,) and substr(,,)
11.18.3.SUBSTR(x, start [, length]) returns a substring of x that begins at the position specified by start.
11.18.4.Substr retrieves a portion of the string
11.18.5.Retrieval begins at position 5 and again goes for 12 characters
11.18.6.A retrieval with no third argument: it starts at begin and retrieves the rest of the string
11.18.7.If begin is negative, then retrieval occurs from the right-hand side of original string
11.18.8.SUBSTR and INSTR used together
11.18.9.Combine SUBSTR and INSTR to deal with a table column
11.18.10.Combine DECODE and SUBSTR together
11.18.11.Example SELECT output using SUBSTR().
11.18.12.substr birthday
11.18.13.Compare substring in where statement
11.18.14.Manipulating Strings: SUBSTR and concatenation
11.18.15.substr(date value,8)+16