to sort on row in asc and second row in desc in a table of 1

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
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

to sort on row in asc and second row in desc in a table of 1

Post by sunitha_cts »

Hi,

How can we sort the first row in asc and second row in desc in a table of ten columns.
Thanks
suniotha
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, simply because there's nothing that allows you to sort a row.

I assume you want a result something like

Code: Select all

 1  2  3  4  5  6
10  9  8  7  7  6
 3  5  9 11 13 20
15 14 12 10  9  5
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post by sunitha_cts »

HI,

EMPNO ENAME
70 AAA
10 BBB
30 ZZZ
.......UPTO 10 ROWS

70 AAA SHOULD BE IN ASC
10 BBB SHOULD BE IN DESC

Thanks
sunitha
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You want to sort odd numbered rows and even numbered rows separately? Then separate them into two streams and sort them separately. Use a Funnel when re-assembling the rows into a single stream.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, you don't "sort a row" so this makes absolutely no sense. Extend your example to all 10 rows and show 10 rows of output, maybe that will help explain what you are trying to say. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply