Sorting data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajeevm
Participant
Posts: 135
Joined: Sun Jan 22, 2006 10:44 am

Sorting data

Post by rajeevm »

Hi All,

I would like to sort the input column on descending order but facing problem with it. My input data looks

Col1, Col2
A, 5
B, 10
C, 15
D,20
E,25
F,30
G,35
H,40
I,45
J,50

I used sort stage in descending order and in sequential mode.

and the output I have

J,50
A,5
I,45
H,40
G,35
F,30

How to sort the data if it have single digit.

I appreciate your help

Thanks
Raj
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Convert column 2 from a string to a numeric datatype, such as integer or decimal, before sorting.

Regards,
Last edited by jwiles on Tue Jan 15, 2013 12:33 am, edited 1 time in total.
- james wiles


All generalizations are false, including this one - Mark Twain.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Alright Ashton, you can come out now...

Image
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

ya think? :)
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply