Hi Experts, I have a dataset like below data have; input ord desc $; cards; 0 dfkasdf 1 qewrqwe 2 werewrqe 3 etritreter 4 cvczcvzcve 5 werewrqwer 6 rqwerqwerq 7 vczcvzvzcved 8 wereruipeewr 9 dhfewrwerq 10 wrwerwerq 11 ewryteiqwe 12 rewrbnmnbz 13 wecvxcvjzc 14 ewrwerqwe 15 itititoeoe ; run; I need to create a varaible call grp like below select(ord); when(0,12,8,4) grp=1; when(1,13,9,5) grp=2; when(2,14,10,6) grp=3; when(3,15,11,7) grp=4; otherwise; end; i want the dataset in same soring order like grp 1 0 12 8 4 2 1 13 9 5 3 2 14 10 6 4 3 15 11 7 any suggestion On Array, SQL Thanks Sam
... View more