Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
I need to split date field as two different fields(FromDate,ToDates).
please find the attached file for Example.
Thanks in Advance.
Koti.
Try this
VACATION: LOAD Code, CodeID, FieldDate, Empname, Ceil(AutoNumber(RecNo(), Code&CodeID&Empname)/2) as TempField1, Mod(AutoNumber(RecNo(), Code&CodeID&Empname), 2) as TempField2 FROM [Temp.xlsx] (ooxml, embedded labels, table is Sheet2); FinalTable: LOAD Code, CodeID, FieldDate as From, Empname, TempField1 Resident VACATION Where TempField2 = 1; Left Join (FinalTable) LOAD Code, CodeID, FieldDate as To, Empname, TempField1 Resident VACATION Where TempField2 = 0; DROP Table VACATION;
Try this
VACATION: LOAD Code, CodeID, FieldDate, Empname, Ceil(AutoNumber(RecNo(), Code&CodeID&Empname)/2) as TempField1, Mod(AutoNumber(RecNo(), Code&CodeID&Empname), 2) as TempField2 FROM [Temp.xlsx] (ooxml, embedded labels, table is Sheet2); FinalTable: LOAD Code, CodeID, FieldDate as From, Empname, TempField1 Resident VACATION Where TempField2 = 1; Left Join (FinalTable) LOAD Code, CodeID, FieldDate as To, Empname, TempField1 Resident VACATION Where TempField2 = 0; DROP Table VACATION;