Problem with Sort stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Problem with Sort stage

Post by ady »

In the query there is order by three fields (ie order by 1,3,4)
and i used sort stage to satisfy that , but the data is not sorting .

any clue why this is happening?

any other solution to sort apart from this?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Re: Problem with Sort stage

Post by DSguru2B »

beaditya wrote:In the query there is order by three fields (ie order by 1,3,4)
and i used sort stage to satisfy that , but the data is not sorting .

any clue why this is happening?

any other solution to sort apart from this?
Click on the blue part to go to beaditya's relating post.

How are you exaclty specifying the sort criteria? Read the plug-in documentation of sort stage for more info.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Re: Problem with Sort stage

Post by ady »

DSguru2B wrote:
beaditya wrote:In the query there is order by three fields (ie order by 1,3,4)
and i used sort stage to satisfy that , but the data is not sorting .

any clue why this is happening?

any other solution to sort apart from this?
Click on the blue part to go to beaditya's relating post.

How are you exaclty specifying the sort criteria? Read the plug-in documentation of sort stage for more info.


i gave in the sort specification as
MGMT_ACCT asc,Redeploy_Eff_Date asc,Eff_Date asc.

is there any other way to do so . its not even sorting MGMT_ACCT either.
dsscholar
Premium Member
Premium Member
Posts: 195
Joined: Thu Oct 19, 2006 2:45 pm

Re: Problem with Sort stage

Post by dsscholar »

Why are you not using the "order by" clause in the query itself ..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I dont think thats whats happening in the OP's case. I think its more like a datatype problem. beaditya might be expecting a numeric sort on a char field or viceversa.
Even i try not to use the sort stage. I usually adhere to the unix sort. Much faster.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply