Page 1 of 1

Sort scrambling data

Posted: Wed Aug 25, 2021 4:38 pm
by kengrubb
I have a plain text data file of just under 100K rows. The data are all 5 to 8 digit numbers.

I sort it using

First Key From: 1
First Key Length: 10
Sort Order: Ascending
Comparison: Case insensitive or Case sensitive

The data becomes garbled.

I know that I should be using Comparison: Numeric, and when I do, all is well.

However, why are Case insensitive or Case sensitive causing the data to become garbled?
[/list]

Posted: Wed Aug 25, 2021 6:17 pm
by MudGuard
case sensitive/insensitive select a sort by character order (respecting or ignoring case).
Then every word starting with an 'a' will be put before any word starting with a 'b', no matter which characters follow.
Similarly, any word starting with a '1' will be put before any word starting with '2'.

So you get something like
0
1
10
100
101
...
109
11
12
...
19
2
20
...

Posted: Thu Aug 26, 2021 12:08 am
by kengrubb
I should be clear, the data itself changes.

A sort order looking at the number as characters makes total sense.

But I'm seeing that the data itself changes.

Posted: Thu Aug 26, 2021 5:54 am
by MudGuard
can you provide a small sample file showing the effect?