Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
SQL User Defined Function
Avdhesh
Hello,
I'm trying to use SQL User Defined Function in Birt SQL query; however, Birt is throwing an exception
Here is my SQL Query
SELECT DPDNM, DPDAG, SSNAPPLYMASK('ALAN', DPSS,' ') AS DPSS,DPDBE, CDDESC
FROM PEPDP, PRPCD
WHERE CDER = DPER AND CDFIVE = DPREL AND
DPER = ? and (DPEN) = ?
SSNAPPLYMASK is SQL user defined function (not stored procedure) which returns masked value of tax id.
I could run this query without any issue in Java using JDBC.
Here is error:
Error Code:odaconsumer.CannotExecuteStatement
Error Message:Cannot execute the statement.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1: [SQL0901] SQL system error.
;
java.sql.SQLException: [SQL0901] SQL system error.
Thanks for your help.
Avdhesh
Find more posts tagged with
Comments
mwilliams
Hi Avdhesh,
What is the data type returned by your custom function?
thuston
M, I'd bet it's a string/varchar. You can't mask a SSN as anything else.
Does the query work when you remove that column?
What if you remove just the AS?
Are you using the same driver you used in your Java test?
Avdhesh
Thanks for your reply.
It was an environment issue. Once I put the underlying libraries UDF is working fine.
Again thanks for your help
Avdhesh