Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Have a field name "Runs" and the values under it are like this
0.01
0.2
.06
.7
.09
1
2
3
4
4.0
5
6
In the script i want to derive one more column from this where the condition is
if(Runs>=0.01 and <=0.9 'Low'
if(Runs=>0.9 and <= 2 'middle'
if(Runs=>2 'High') as Consolidate
How do i achieve this in the script level
Can someone help me please
Something like this:
Table:
LOAD Runs,
If(Runs>=0.01 and Runs <=0.9, 'Low', If(Runs >= 0.9 and Runs <= 2, 'Middle', 'High')) as Consolidate;
LOAD * Inline [
Runs
0.01
0.2
.06
.7
.09
1
2
3
4
4.0
5
6
];
Something like this:
Table:
LOAD Runs,
If(Runs>=0.01 and Runs <=0.9, 'Low', If(Runs >= 0.9 and Runs <= 2, 'Middle', 'High')) as Consolidate;
LOAD * Inline [
Runs
0.01
0.2
.06
.7
.09
1
2
3
4
4.0
5
6
];
Try this ways
if(Runs >= 0.01 and Runs <= 0.9 ,'Low',
if(Runs => 0.9 and Runs <= 2 , 'middle',
if(Runs => 2, 'High' ) as Consolidate
Regards,
Anand
chk below