Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Viewers,
how to create flage for
same employees(emp id) which having different doj
Any help will be appreciated!
Ohh, got it. Use Floor() like:
t1:
LOAD id,
Date(floor(doj),'DD-MMM-YY') as doj,
type
FROM
[modify.xlsx]
(ooxml, embedded labels, table is May);
LOAD id,
Date(floor(doj),'DD-MMM-YY') as doj,
type
FROM
[modify.xlsx]
(ooxml, embedded labels, table is Jun);
join
LOAD
id,
Count(DISTINCT doj) as count
Resident t1
Group By id;
final:
LOAD*,
If(count>1,1,0) as flag1
Resident t1;
DROP Table t1;
What is doj ?
Can you give us a better view of your data model/structure ?
You have to explain little more with data
Date of joining
Explain with a sample data set
Different "doj" compared to what ?
As loveisfail told, we need more details regarding your table structure.
I have a table with employee id and date of joining
I want to count employee who are having different doj
Let me take
Emp id 1 has two different doj's.
For this I want to create flag
How to accomplish this?
Hi Avinash,
I have a table with employee id and date of joining
I want to count employee who are having different doj
Let me take
Emp id 1 has two different doj's.
For this I want to create flag
How to accomplish this?
I have a table with employee id and date of joining
I want to count employee who are having different doj
Let me take
Emp id 1 has two different doj's.
For this I want to create flag
ultimately I want to count same employees who are having different DOJ.
How to accomplish this?
Try like:
Input:
Load
EmpID,
DOJ
From <>:
Join
Load
EmpID,
Count(Distinct DOJ) as Count
Resident Input Group By EmpID;
Final:
Load
*,
If( Count>1, 1,0) as Flag
Resident Input;
Drop Table Input;