sorting SQLite keys where no leading zeros at end of name

Peter Haworth pete at lcsql.com
Thu Jun 4 19:26:38 EDT 2015


Let me know if it works.  I might have the wrong number of prans, etc but
the theory should work.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Thu, Jun 4, 2015 at 4:12 PM, Dr. Hawkins <dochawk at gmail.com> wrote:

> On Thu, Jun 4, 2015 at 4:07 PM, Peter Haworth <pete at lcsql.com> wrote:
>
> > ORDER BY substr(TheKeyColumn,1,instr(TheKeyColumn,'_')-1)
> > ASC,CAST(substr(TheKeyColumn,instr(theKeyColumn,'_')+1) AS INTEGER) ASC
> >
> > If there are a fixed number of chars before the numeric part of the key,
> > then you can replace the instr calls with the appropriate number of
> chars.
> >
>
> ooh.  Wonderful.  Perfect.
>
> I'm looking for a solution like this, rather than the livecode like Mike's,
> because I have a rather clean setup at the moment.  I have the queries as
> properties of the objects I'm maniuplating, and the livecode solution would
> require a type of check that leads to spaghetti . . .
>
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list