Did you know that a Code field is sorted different depending of you are using Native or SQL?
SQL will sort the Code field as a Varchar – which means it will sort the Code field as text!
In the following sorting example you can see the sorting Native vs. SQL
Native SQL 1 1 2 10 3 2 10 3 A A AA B B C C AA
So what to do if you are using SQL and still want a code field to be sorted in the same way as in Native? Use temporary tables!
Temporary tables acts in the same way as a Native table 🙂
There is a very simple way to get even real sql tables sorted like native tables.
Change the property “SQL Data Type” for the code field from “undefined” to “Variant”. Variant-Fields are sorted the same way as native code fields.
Setting the “SQL Data Type” will not let the code field be sorted in the same way as in native code fields!
The fields will be sorted as following:
If you only look on the numbers, then yes they will be sorted in the same way. But if you are looking on the letters, or are using a mixed environment, then they are not sorted in the same way by just using “Variant”.
Good words.