Keep issue : putting conditional statements while doing keep
i have two tables base table and validation table. base table have a counter .when i do left join between base and validation, i am getting extra duplicate records and so when i take sum(counter), the count is more . i tried using left keep and count now matches the desired count but the problem is i have done some if conditions and all like below in validation table
If(IsNull(Email_validated_manually) or Email_validated_manually='',0,Email_validated_manually) as Email_Validated_Final,// 1 or 0 values to be used as flags
If(Email_validated_manually=1,'Yes','No') as Email_Validated,// for filters in front end
and this maps incorrectly when left keep is done.
Please help.Sample data given below.
i cant put up an accurate scenario here but in my data model, by using left keep my count matches. but i need to create some field based on the validation table to filter the base table. how can that be possible?
I tried using updated date for each record( that is another field in validation table) but there are multiple records for the same partyrk updated on the same day.i used max(updated day) to fetch most recent record but bcz of this duplication,im having troubles.