I'd like to know if is possible use de DBMS_OUTPUT module of DB2 in a function and how can I use this when I'm running the select.
It's possible use something like:
SET SERVEROUTPUT ON
SELECT MYFUNCTION FROM TABLE;
Thanks
I'd like to know if is possible use de DBMS_OUTPUT module of DB2 in a function and how can I use this when I'm running the select.
It's possible use something like:
SET SERVEROUTPUT ON
SELECT MYFUNCTION FROM TABLE;
Thanks
Yes, you can use the DBMS_OUTPUT inside a function. Please take a look at the KnowledgeCenter: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0053534.html?lang=en
If you want to show the result of a select in dbms_output, you should use a cursor, assign the values to variables and then pass them to dbms_output.
Remember that the output will appear at the end of the execution of the function, not while it is executing.