Hi,
I'm trying to insert a formula which can lookup if it is null in 2 fields for the same row/record and if it is then output "No" else output "Yes" --> IIF(IsNull([Field 1]) AND (IsNull([Field 2]),"No","Yes")
The error I keep receive is "Malformed If statement".
Any help is appreciated - thanks.
Solved! Go to Solution.
It worked perfectly! Thank you for that
Great. If you wouldn't mind, could you mark that as solved?
thanks,
mark
HI,
I'm getting following error.
IIF(isnull("Part No"),"Include","Exclude")
Error: Formula In-DB (32): Error SQLPrepare: [EXASOL][EXASolution driver]function or script IIF not found [line 6, column 20] (Session: 1594182034651602363)
It doesn't look like Exasol supports IIF.
You probably need to use a standard SQL IF
IF "Part No" is Null Then 'Include' Else 'Excude' End
Part time Tableau, Part Time Alteryx. Full Time Awesome
ok thanks so could be Exasol doesnt support but I'm working on Alteryx WF it should have created the column in WF and posted the new column in Exasol.
However here is what I'm trying and still getting the error.
if "Billings$"<"BillingsCost$"
then "Billings$"-"BillingsCost$"
else 0
endif
error Im getting-
Error: Formula In-DB (32): Error SQLPrepare: [EXASOL][EXASolution driver]syntax error, unexpected IF_ [line 6, column 20] (Session: 1594182456386870715)
You're using the In-DB tools which need to be coded in the native language of the database, which in this case is Standard SQL
More info is here: https://help.alteryx.com/9.5/LockInFormula.htm
Part time Tableau, Part Time Alteryx. Full Time Awesome
ahh great thanks this makes sense to me now.
ANy thoughts on error message m getting on if formula?
BR
Brij
The error is caused by the format if your IF statement....the way it is written is for Alteryx..which is not the same as SQL.
It will need something like:
if "Billings$"<"BillingsCost$"
then "Billings$"-"BillingsCost$"
else 0
end
I'm not a SQL coder so I'm not 100% sure of the correct syntax
Part time Tableau, Part Time Alteryx. Full Time Awesome