Page 1 of 1

Sorting in Server Jobs

Posted: Tue Aug 19, 2008 2:37 pm
by ds2000
Hi,
I want to do sort in a server job. I tried to get help for server SORT stage but couldnt. Can anyone help me out what options has to be set in SORT stage with some example plz.

Thanks.

Posted: Tue Aug 19, 2008 2:40 pm
by chulett
Meaning you didn't understand the help or couldn't find any help for the stage?

Posted: Tue Aug 19, 2008 2:48 pm
by chulett
The two biggest things to know are:

1. Never leave the Temporary Directory empty as that puts all work files in the Project
2. How to enter the Sort Specifications

The sort specs are simply a column separated list of the columns to sort on (in that order) and the 'direction' to sort:

Code: Select all

Column_A asc, Column_B ASC, Column_C desc
A or ASC = ascending, case insensitive
D or DESC = descending, case insentive
a or asc = ascending, case sensitive
d or desc = descending, case sensitive

You can also supply a custom collation order using an 'external character map' but let's not worry about that quite yet.

Posted: Tue Aug 19, 2008 2:49 pm
by chulett
The two biggest things to know are:

1. Never leave the Temporary Directory empty as that puts all work files in the Project
2. How to enter the Sort Specifications

The sort specs are simply a column separated list of the columns to sort on (in that order) and the 'direction' to sort:

Code: Select all

Column_A asc, Column_B ASC, Column_C desc
A or ASC = ascending, case insensitive
D or DESC = descending, case insentive
a or asc = ascending, case sensitive
d or desc = descending, case sensitive

You can also supply a custom collation order using an 'external character map' but let's not worry about that quite yet.

Posted: Tue Aug 19, 2008 3:23 pm
by ds2000
I provided Sort Specification as below and it errored out:

TRAN_NO Desc

Drivertest..Sort_29: Internal Error: sort specification error, function create_sort_spec returned [Invalid sort specification]

I mentioned Temp directory as follows:
\\xyz1\DEV\temp

Posted: Tue Aug 19, 2008 3:25 pm
by mikegohl
It is case sensitive

Posted: Tue Aug 19, 2008 3:27 pm
by chulett
Right, so either desc or DESC but not mixed case.

Posted: Tue Aug 19, 2008 3:48 pm
by ds2000
It worked with correct case. Thanks.

Re: Sorting in Server Jobs

Posted: Tue Sep 09, 2008 6:02 pm
by code_titan
Now, can someone tell me how to sort the entire record using a server sort.

I have 1013 Rows
With column structure: RTC OTC RecType ...
RTC and OTC are Keys and columns I need to sort by.

Posted: Tue Sep 09, 2008 7:57 pm
by chulett
A) Welcome.
B) You really need to start your own topic.
C) When you start you new post, explain what you mean by 'server sort'.