Hi,
I'm quite ignorant about SQL so I haven't a clue about what is happening to a customer of mine.
They have just migrated from a native NAV 2.60 database to a SQL 5.0. There is a table which in the native DB used to be ordered like this:
Now, in sql the order looks like this:
I'm aware that sql orders code fields with a different logic, but... which logic? There doesn't seem to be any here!
Looks to me like the '-' character is being ignored for sorting purposes.
My (limited) understanding of NAV is sorting is based on the chosen key. Is it possible the key chosen for sorting is different than the column being shown in this example?
NAV native sorting is defined in fin.stx. You can take a look at that file to see native sorting. SQL sorting it's based in collation. Sorting using collation will push some non alphanumeric chars to be before letters. Native sorting puts push some non alphanumeric and the end. So you will have 2 sort methods. This is one of the reasons to check before making upgrade from Native to SQL.