Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to do
ageing analysis for time and
duration for message like [0-2][2-10][5-20][>20 hrs]
Time duration will be like below
10:06:32 ,
82:05:30 etc
Pls share with me if you ageing analysis like this. Thanks in advance.
HI
Try like this
Load
if([ Time] <= 1 , '[0-1]',
if([Time] <= 3 AND [Time] > 1 ,'[2-3]',
if([Time] <= 5 and [Time] > 4, '[4-5]', '[5-20]'))) as aging
FROM TAB1;
or
Load *,
if([ Time] <= 1 , '[0-1]',
if([Time] <= 3 ,'[2-3]',
if([Time] <= 5 '[4-5]', '[6-20]'))) as aging
FROM TAB1;
Both are same..
Remove the space in first If():
[ Time]
this expression seems to me proper:
Load
if([Time] <= 1 , '[0-1]',
if([Time] <= 3 AND [Time] > 1 ,'[2-3]',
if([Time] <= 5 and [Time] > 4, '[4-5]', '[5-20]'))) as aging
FROM TAB1;