Correct I am only sorting strings, as in the list I provided in an earlier 
post. I 5, I 10, SR 34, US 101 …..etc.

That’s where I’m getting hung up. The Xcompare part of the 
SQLite3_create_collation function. 

Registering of the custom collation is far from intuitive (for me) and thus the 
reason for my question.


On Apr 2, 2014, at 10:45 AM, Richard Hipp <[email protected]> wrote:

> On Wed, Apr 2, 2014 at 1:38 PM, Donald Steele <[email protected]> wrote:
> 
>> So am I misunderstanding how to get what I am after?
>> 
>> I am using a select statement to produce a list of records "ordered by"
>> the highway column.
>> My understanding was that the select statement would include my collation
>> as part of the order by function.
>> 
>> Is this not the case?
>> 
> 
> Right.  You can say:
> 
>    SELECT * FROM table ORDER BY column COLLATE naturalSortOrder;
> 
> Where your special collating function has previously been registered under
> the name "naturalSortOrder", then your comparison function will be used to
> do the sort, as least for those rows of table where column is type TEXT.
> For other datatypes (NULL, INTEGER, REAL, BLOB) the collating function is
> ignored.  You are sorting just strings, right?
> 
> -- 
> D. Richard Hipp
> [email protected]
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to