append
Appends any character field (char/varchar/lvarchar) to an existing CLOB object.
Setup
Syntax
CREATE FUNCTION append(CLOB, LVARCHAR) RETURNS CLOB EXTERNAL NAME 'com.informix.judrs.LargeObjects.append(java.sql.Clob,java.lang.String)' LANGUAGE JAVA;
GRANT EXECUTE ON FUNCTION append(CLOB, LVARCHAR) TO PUBLIC;
Usage
> insert into test values("Hello ", toClob("world")); > select a, lobsize(b) from test; a | (expression) | ---------------------------------------- Hello | 5 | > execute function append((SELECT b from test), ". Good day"); > select a, lobsize(b) from test; a | (expression) | ---------------------------------------- Hello | 15 |