Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone help me if the condition is not coming under this (1 to 60 months, it must be less than 1 month) how to flag that one?
T1:
LOAD *,
IF(MonthDiff >= 1 AND MonthDiff <= 12, 'Flag1',
IF(MonthDiff >=13 AND MonthDiff <= 36, 'Flag2',
IF(MonthDiff >=37 AND MonthDiff <= 60, 'Flag3','Flag4'))) AS Status;
Isn't Flag4 what you want? It would include anything less than 1 month and greater than 60 months
IF(MonthDiff >= 1 AND MonthDiff <= 12, 'Flag1',
IF(MonthDiff >=13 AND MonthDiff <= 36, 'Flag2',
IF(MonthDiff >=37 AND MonthDiff <= 60, 'Flag3',
IF(MonthDiff =0 , 'Flag4')))) AS Status;
the expression that you are using would give Monthdiff<1 or monthdiff >60 for 'Flag4' use this instead
less than 1 month
less than 1 month??
are you going to write more than this or that was it