Finished with error: Function 'ifnull' with arity 2 not found

This is my query which I am trying to use in VQL Shell "SELECT srno_0, employeeid, firstname, lastname, country, Coalesce ( CASE WHEN Country= "USA" THEN (concat(ifnull(substr(SSN,1,3), ''), '-XX-XXXX')) end, CASE WHEN Country!= "USA" THEN (concat(ifnull(substr(SSN,1,11), ''), ''))else null end )as SSN from admin.employeeinformation_dv;" The problem is that when I run this query on VQL Shell I am getting below error. "**Finished with error: Function 'ifnull' with arity 2 not found**" Can some one please help me to resolve this issue.Thanks in advance for your help.
user
11-03-2018 19:46:11 -0400

1 Answer

Hi, Th error "Finished with error: Function ‘ifnull’ with arity 2 not found“ would occur when you try to pass incorrect parameters to the function. In Denodo Platform you could use the function “NULLIF” instead of ifnull which compares two values or expressions and returns null if they are equal. The syntax for the function is NULLIF(<expression>,<expression>) You could try to pass the necessary parameters in the function and execute to get the expected results. Have a look at the [NULLIF](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/other_functions#nullif) section of the Virtual DataPort VQL Guide for more information. Hope this helps!!
Denodo Team
12-03-2018 09:01:29 -0400
You must sign in to add an answer. If you do not have an account, you can register here