Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys,
I have two tables as shown below,
I need to compare these two tables and to create flag. If the SheetDate in the second table and Date in the first table is matched, then Flag=1 otherwise Flag=0. I want exactly as in the below image,
Plz help me to achieve this friends.
where you want to achieve
In front end or back end
in front end
take straight table
dimension
EmpId
date
sheetdate
Expression
if(date=sheetdate,'1')
In back end
Temp:
Load EmpId,date from table1;
join
Load EmpId,SheetDate from table2;
noconcatenate
Final:
Load *,if(date=sheetdate,'1') as flag Resident Temp;
Regards,
Prashant
Hello, Siva!
Use left join:
Table 1
EmpID,
Date
left join
Table 2
EmpID,
SheetDate as Date,
SheetDate,
1 as Flag
And you will get what you want (except of 0 values - it will be null)
PLEASE TRY THIS
hi guys,
If I check this with some sample data, its working. But as per my original data it is not working.
I have attached my data along with this...
Please anybody help in this....