Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if(Column10 >0 and Column10 <=2, '0-2',
if(Column10 > 2 and Column10 <=5, '3-5',
if(Column10 >5 and Column10 <=10, '5-10',
if (Column10 > 10, '>10 years')))) as [Length of Service],
would like to use dual if possible.
I know I can a prepend on the values by using 1:0-2 and then using subfield in my expression.
Just wondering what are the possibilities here...
I would like to see the order as:
0-2
3-5
5-10
>10 years
The easiest way is to first create a small inline table in the script with the values in the order you want them sorted:
Sort:
LOAD * INLINE [
Length of Service
0-2
3-5
5-10
>10 years
];
Put that above the part that calculates the Length of Service field from the Column10 values.
That way the default sort order (By Load order) is determined by the Sort table you create first.
The easiest way is to first create a small inline table in the script with the values in the order you want them sorted:
Sort:
LOAD * INLINE [
Length of Service
0-2
3-5
5-10
>10 years
];
Put that above the part that calculates the Length of Service field from the Column10 values.
That way the default sort order (By Load order) is determined by the Sort table you create first.