Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to implement Java UDF using CLOB for DB2GENERAL parameter passing?

0
Posted

How to implement Java UDF using CLOB for DB2GENERAL parameter passing?

0

When you use DB2GENERAL parameter passing in the declaration of the SQL UDF, DB2 will use the legacy driver to map the data types between Java and DB2. If you need to pass CLOB as a parameter in your JAVA UDF, please follow these points. 1. You have decided to use the parameter style for a JAVA UDF as DB2GENERAL. 2. The Java class that you are writing should extend UDF from COM.ibm.db2.app.UDF 3. The return parameter should be the part of Java function arguments. 4. You should use COM.ibm.db2.app.Clob for Clob and not java.sql.Clob For example, if you want to write a java UDF that will do pattern matching on a CLOB column and returns 1 if a match was found else returns 0.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.