Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
As per the script given below, I need to fix the date join once following conditions are satisfied
**MonthjoinTemp<>currentMonth
**For currentMonth , paid needs to be zero of the employee.
Can you please combined both in a if statement?.
Thanks
Neville
LOAD BR_Code, Month,MONTH(Month)as tr_month,YEAR(Month) as TR_YEAR,EPF_NO,Repeat('0', 6-len(EPF_NO))& EPF_NO as EPF,
EMP_NO,Repeat('0',6-LEN(EMP_NO))&EMP_NO AS EMP ,[Employee_ Name], PAID
FROM [D:\PAY_SUMMERIES.xlsx] (ooxml, embedded labels, table is Sheet3);
left join (Sheet3)
load 1 as monthLeftFlag,
date(max(Month)) as MonthLeftTemp ,
date(Min(Month)) as MonthjoinTemp,
EMP_NO
Resident Sheet3
Group By EMP_NO;
Left Join(Sheet3)
LOad date(max(Month)) as currentMonth
Resident Sheet3;
Data:
load *,
if(MonthLeftTemp=currentMonth,'Active','Left') as EMP_STATUS,
if(MonthLeftTemp<>currentMonth,MonthLeftTemp) as MonthLeft,
if(MonthjoinTemp<>currentMonth,MonthjoinTemp)as MonthJoin
Resident Sheet3;
drop Table Sheet3;
Can some one help me on this
Try this.
If (MonthjoinTemp<>currentMonth, 'Not Current',
If (MonthjoinTemp =currentMonth,0, 'MonthJoned'))
seems to be not working
Load *,
if (Month = currentMonth, 0, PAID) as PAID2
Resident Data;
Neville, did Desh's last post get things working? If so, please use the Accept as Solution button on that post to mark that as the soluiton and give Desh credit for the help provided. If you figured out something else, consider posting that and mark it, and if you are still working on things, leave an update on where things are.
Regards,
Brett
Deshikas
It doesn't make what I need to achieve. Could you please send me your out put to see what you have got is something help me in some way.
Thanks for your help