Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I am getting an "invalid expression" error executing this script. Any ideas how to fix it?
Thanks, Tom
LOAD
sum(AMOUNT) as amount,
ACCOUNT as KONTO
,if (len(trim(CODE_B))>0, CODE_B, 0) as ANSV_ID
,if (len(trim(CODE_F))>0, CODE_F, 0) as CounterPart
,CODE_C as PROJEKT_Id
,CODE_C as %Key_Project
,YEAR_PERIOD_KEY as period
,CODE_E as OrderClass
,'IFS-' & if(len(CODE_E)=0,0,CODE_E) as %Key_OrderClass
,'IFS IL Group' as Source
FROM [lib://$(v_Env)/04_Datasource/01_QVD/INTERNAL.csv]
(txt, utf8, embedded labels, delimiter is ',', msq)
group by CODE_B, CODE_F, CODE_C, YEAR_PERIOD_KEY, CODE_E;
ACCOUNT isn't listed within the group by. Further listing fields like your CODE_# isn't always enough, if they are used within expressions like the if-loops - means you may need to include the if-loop also in the group by, like:
group by ACCOUNT, if (len(trim(CODE_B))>0, CODE_B, 0), ....
- Marcus
ACCOUNT isn't listed within the group by. Further listing fields like your CODE_# isn't always enough, if they are used within expressions like the if-loops - means you may need to include the if-loop also in the group by, like:
group by ACCOUNT, if (len(trim(CODE_B))>0, CODE_B, 0), ....
- Marcus