On Apr 2, 2014, at 7:28 AM, Donald Steele <[email protected]> wrote:
> Greetings I am an iOS developer that is much more comfortable with iOS than > SQLite. I have an iOS app that uses a database with several tables. These > table the app user uses as directories. The user moves from screen to screen > making selections from lists generated from my Sqlite database (tables). Many > of those lists are “sorted” by using order by. In most cases that works fine. > BUT I have two columns that order by gives “odd” results. The columns are > highways & exits. Exits I have used Zero fill to get the results i need. > (Altho I would prefer not using zero fill since it “looks odd”). > > From what I can find out Sqlite uses an ASCII sort in order by, I think what > I need is a normal or what I call alpha-numeric sort. I gather the way to do > that is to use the SQlite3_create_collation method. Frankly I can’t get my > arms around this method nor can I find any good explanations or even exampls > that make sense. > > I read some where in my searches that Apple has “canned” versions of that > method but I can’t find those either. > > Could someone direct me to some basic tutorials or explanations where I can > get a better understanding before I dive in to create my own collation? Can you give us some examples of the data that’s not sorting properly? Is the issue that mixed alpha and numeric fields don’t sort as you expect (for instance, that “I-5” sorts after “I-400”?) James _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

