DBMS_LOB.SUBSTR

0

DBMS_LOB.SUBSTR

This function returns amount bytes or characters of a LOB, starting from an absolute offset from the beginning of the LOB.

For fixed-width n-byte CLOBs, if the input amount for SUBSTR is specified to be greater than (32767/n), then SUBSTR returns a character buffer of length (32767/n), or the length of the CLOB, whichever is lesser. For CLOBs in a varying-width character set, n is 2.

Syntax:



Example :
SELECT    DBMS_LOB.SUBSTR(ERROR_MESSAGE,4000,1)  COLUMN_A 
FROM MY_TABLE WHERE ERROR_MESSAGE IS NOT NULL