Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Guys, May i know what is the problem in my if statement? I'm trying to get the total adj_amt per dmd_flow_id (INDEM, PRDEM,PNDEM)
LDA: LOAD Account_Number, Payment_date, dmd_flow_id, adj_amt, IF(dmd_flow_id='INDEM',SUM(adj_amt)) as Interest_collected; SQL SELECT Account_Number, Payment_date, dmd_flow_id, adj_amt FROM `payment table`;
Thank you
Hi Sir, when i tried your code the error show: Field 'dmd_flow_id' not found.
Thank you
try this
LDA:
LOAD
Account_Number,
Payment_date,
dmd_flow_id,
adj_amt;
SQL SELECT Account_Number,
Payment_date,
dmd_flow_id,
adj_amt
FROM 'payment table';
NoConcatenate
Final_LDA:
Load *
Resident LDA;
left Join(Final_LDA)
Load dmd_flow_id, sum(adj_amt) as Interest_collected
resident LDA
where dmd_flow_id='INDEM'
Group by dmd_flow_id;
drop Table LDA;
ZZ
What exactly are you trying to do? Can you explain this with an example?