Forum Discussion
Merge sort with alternative sort orders (EBCDIC vs ASCII)
Some more details:
Table 1 has stock movements and dates, with the resulting stock balance at the end of that day.
Table 1
Table 1 doesn't have rows on days where there were no stock movements for an item, so it needs to be put into a full calendar and filled down for each item/stockroom group. Table 1 is merged into table 2 which has the same item list, but a full calendar of dates (though it's just set to show a week here):Table 2
At this stage, the groups haven't been filled down yet, but you can see that the RM2490 values have merged over correctly, but the R011 and onwards haven't.
A later stage uses GroupKind.Local in a Table.Group function and seems to group all the rows correctly, despite the EBCDIC sort order. It just seems to be an issue with JoinAlgorithm.SortMerge. With further testing, I see that it doesn't work with descending sort orders either so I think it's limited to purely ASCII ascending sorted columns only.
For now, I think I'm forced to at least do some data sorting in PQ, but at least I think I know the most optimum places to do it. Hopefully I can find a way to switch the sort order at the source later.