Hi, currently my output is thsi way:
CLIENTID RECORDTYPE EMPNO GroupPolicynumber
ABC101 A1
ABC101 A2
ABC101 A2
ABC101 A3
ABC101 A4
ABC101 A4
ABC101 A5
ABC101 A5
ABC101 B1 7990778998
ABC101 B1 7990789734
ABC101 I1 7990778998 457893275B
ABC101 I1 7990778998 879765992A
ABC101 I1 7990789734 JHJU898977
ABC101 I2 7990778998 457893275B
ABC101 I2 7990778998 879765992A
ABC101 I2 7990789734 JHJU898977
ABC101 I2 7990789734 JHJU898977
and i need it to be sorted this way, i tried many times in many ways, i could not get, any help, wt conconetion should be used while sorting?
ABC101 A1
ABC101 A2
ABC101 A2
ABC101 A3
ABC101 A4
ABC101 A4
ABC101 A5
ABC101 A5
ABC101 B1 7990778998
ABC101 I1 7990778998 457893275B
ABC101 I2 7990778998 457893275B
ABC101 I1 7990778998 879765992A
ABC101 I2 7990778998 879765992A
ABC101 B1 7990789734
ABC101 I1 7990789734 JHJU898977
ABC101 I2 7990789734 JHJU898977
ABC101 I2 7990789734 JHJU898977
Sorting at different record levels
Moderators: chulett, rschirm, roy
When you examine the desired output sequence, look at the way the column values are grouped together. Which ones change value while others stay the same? The ones that change are further down in the sort order than those that stay the same. You can do this two columns at a time. For example: comparing columns A and B--if B's values stay the same while A's change, then B is sorted before A (i.e. sort order is B, A).
Regards,
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Looks like you need to sort by CLIENTID then by EMPNO then by GROUPPOLICYNO then by RECORDTYPE and specify Nulls Position as First.
Last edited by ray.wurlod on Thu Dec 20, 2012 9:21 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: