Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
my if statement is failing, but I'm not sure why
Here is my statement:
if(Single_asset_only_assigned + Single_asset_only_derived = 1,
if(len(asset_class_assigned)>0, asset_class_assigned, asset_class_derived),
if(Single_asset_only_assigned + Single_asset_only_derived = 2,
if(Single_asset_only_assigned = Single_asset_only_derived, asset_class_assigned,'')
,'')
) as "combo.Name of all asset classes"
the second "if" is highlighted in red but I cant seem to find anything wrong with the statement.
getting the following message when script runs:
The following error occurred:
Unexpected token: 'if', expected one of: ',', 'Inline', 'AutoGenerate', 'From', 'From_Field', 'Resident', 'Extension', ...
The error occurred here:
combo:
Load Distinct
*
>>>>>>if<<<<<<(combo.Single_asset_only_assigned + combo.Single_asset_only_derived = 1, if(len(combo.asset_class_assigned)>0, combo.asset_class_assigned, combo.asset_class_derived),
if(combo.Single_asset_only_assigned + combo.Single_asset_only_derived = 2, if(combo.Single_asset_only_assigned = combo.Single_asset_only_derived, combo.asset_class_assigned,''),'')) as "combo.Name of all asset classes"
Resident combo_temp
Any ideas?
From the error message, it looks like you have an asterisk after the Load Distinct statement. If you remove it does that resolve the error?
@Panv Put "," after "*"
combo:
Load Distinct
*,
>>>>>>if