Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I want to use a construction where the execution within an IF statement is determined wheter an APPLYMAP succeeds in finding a value. My script would look like this:
IF(Applymap(a,b), x=1, x=2)
However the applymap will always give a value. Either the value which is found using the APPLYMAP or the the value b. Is there a way to use the APPLYMAP statement as a boolean?
Thanks!
Hi,
there is also a variant with a defaultvalue. You can use something like:
if(isnull(applymap('mapname',expr,null())),1,2) as x
Regards
Sven
Hi,
there is also a variant with a defaultvalue. You can use something like:
if(isnull(applymap('mapname',expr,null())),1,2) as x
Regards
Sven
Thanks Sven works like a charm! Except the values for 1 and 2 need to be swapped