oracle substrb function to chop a string down to its first 4000 bytes

The substrb 1 , 4000 function will chop a string down to its first 4000 bytes, e.g.: SELECT SUBSTR(‘1€3’,2,1) , SUBSTRB(‘1€3’,1,3) , LENGTH(‘1€3’) , LENGTHB(‘1€3′) FROM dual ; Needed if using the (non default) option of ‘char’ in column lengths: CREATE TABLE mytable ( col1 VARCHAR2(4000 CHAR) ) ; You can change the default setting […]

Read More oracle substrb function to chop a string down to its first 4000 bytes
August 25, 2014