Dataset Natural Sort lazarus / 16-Databases ---------------------------------------------------------------------- Fahmy Rofiq · 2020-03-16 05:07 How to do natural sorting on dataset? thanks.. ---------------------------------------------------------------------- mangakissa · 2020-03-16 09:10 It depends what you mean. Natural sorting is like 'select from '. It's sequential sorting but no sorting at all. Using  'select from
order by ' does sort your query but is not natural. ---------------------------------------------------------------------- rvk · 2020-03-16 09:16 https://en.m.wikipedia.org/wiki/Natural_sort_order You need to specify the underlying database. The sorting is done by the database. For instance... Firebird has NUMERIC-SORT for its collation. https://firebirdsql.org/refdocs/langrefupd25-ddl-collation.html ---------------------------------------------------------------------- Fahmy Rofiq · 2020-03-16 10:05 Yes i'm using firebird ---------------------------------------------------------------------- rvk · 2020-03-16 10:14 Quote from: Fahmy Rofiq on March 16, 2020, 11:05:42 amYes i'm using firebird Then you can create a new collation like this Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i CREATE collation unicode_num FOR utf8FROM unicode 'NUMERIC-SORT=1'; After that you can use that collation to create your fields. If you already have the table, you can apply the collation during a select/order by. Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SELECT * FROM TABLE ORDER BY your_field COLLATE unicode_num (Declaring it in the table will be faster because you can create indexes on it) ---------------------------------------------------------------------- egsuh · 2020-03-25 22:02 Recently I read a book on relational database, which says that relations (i.e. tables of databases) are sets in principle, which means there are no intrinsic order. There are nothing like natural sort. This means that you should supply your own criteria to order / sort, as far as I understand. Well this is rather philosophical approach and many databases provide orders through many ways, e.g. auto-created keys, but the book says that such keys are not the intrinsic part of relational database concepts.