5 Replies Latest reply: Feb 1, 2017 1:28 PM by Sunny Talwar

# group number by range

All,

I'm trying to group Days 0,1 into group1

0,1,2 - group2

0,1,2,3 - group 3

0,1,2,3,4 - group 4

0,1,2,3,4,5 - group5

0,1,2,3,4,5,6,7,8,9,10 - group 6

0....... infinity - group7

• ###### Re: group number by range

Try like this

Test:

[

Days

0

1

0

1

2

0

1

2

3

0

1

2

3

4

0

1

2

3

4

5

0

1

2

3

4

5

6

7

8

9

10

];

Test2:

'Day 1' as All_Days

Resident Test

Where Days <= 1;

Concatenate(Test2)

'Day 2' as All_Days

Resident Test

Where Days <= 2;

Concatenate(Test2)

'Day 3' as All_Days

Resident Test

Where Days <= 3;

Concatenate(Test2)

'Day 4' as All_Days

Resident Test

Where Days <= 4;

Concatenate(Test2)

'Day 5' as All_Days

Resident Test

Where Days <= 5;

Concatenate(Test2)

'6-10' as All_Days

Resident Test

Where Days <= 10;

DROP Table Test;

EXIT Script

• ###### Re: group number by range

So, 'if' statement would not work here right?

• ###### Re: group number by range

Don't think so...

• ###### Re: group number by range

Thanks a lot sunny

Was just checking. Thanks

• ###### Re: group number by range