Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to merge two Flags into one. need to combine all values.
Create common flag (Flag1 & Flag2)
Common_Flag - Test1, Test2, Test3 Test4,
NoConcatenate
T1:
LOAD *,
IF(MonthDiff >= 1 AND MonthDiff <= 36, 'Test1',
IF(MonthDiff >=37 AND MonthDiff <= 60, 'Test2','Test3')) AS Flag1;
LOAD *,
IF(ISNULL(Max_DT) = -1, 'Null', ((year(DateKY)*12)+month(DateKY)) - (((year(Max_DT)*12)+ month(Max_DT)))) AS MonthDiff
Resident Temp;
DROP Table Temp;
NoConcatenate
T2:
LOAD
*,
If(WildMatch(Flag1,'Test1'),
If(Flag1,'Test2','Test1'),'Test4') as Flag2
Resident T1;
Karan, consider attaching your app or a sample, these types of posts generally get better responses when doing that. This will kick things back up the list too, so someone may see it fresh and leave you something, but if you can attach an app, that should help.
Regards,
Brett