-- Collection of code snippets by Arne Vajhøj 
-- created to try various things (2003-now) 
CREATE FUNCTION udf_add(v1 INTEGER,v2 INTEGER) RETURNS INTEGER LANGUAGE java PARAMETER STYLE java NO SQL FENCED THREADSAFE DETERMINISTIC RETURNS NULL ON NULL INPUT NO EXTERNAL ACTION EXTERNAL NAME 'updatespeed.TestUDF.add'
SELECT udf_add(123,456) FROM sysibm.sysdummy1
CREATE FUNCTION udf_dup(s VARCHAR(255)) RETURNS VARCHAR(255) LANGUAGE java PARAMETER STYLE java NO SQL FENCED THREADSAFE DETERMINISTIC RETURNS NULL ON NULL INPUT NO EXTERNAL ACTION EXTERNAL NAME 'updatespeed.TestUDF.dup'
SELECT udf_dup('ABC') FROM sysibm.sysdummy1
