[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] Ignoring "The"
From: "Sherief N. Farouk" <sherief () mganin ! com>
Date: 2008-07-23 13:49:23
Message-ID: 000001c8ecca$ee608130$cb218390$ () com
[Download RAW message or body]
Can you define a custom less-than operator for sorting? If this were C++,
I'd do std::sort(Result.begin(), Results.end(), MyCustomOperator());
- Sherief
> -----Original Message-----
> From: sqlite-users-bounces@sqlite.org [mailto:sqlite-users-
> bounces@sqlite.org] On Behalf Of Andrew Gatt
> Sent: Wednesday, July 23, 2008 9:41 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Ignoring "The"
>
>
> >> I have a table of music artist names which i'd like to output in
> order.
> >> Normally i just use:
> >>
> >> select * from artists order by artist_name;
> >>
> >> What i'd really like to do is order the artists by name but ignore
> any
> >> "the" or "the," preceding it.
> >>
> >> Any ideas?
> >>
> >> Thanks
> >>
> >> Andrew
> >>
> >>
> > Store it like "Beatles, The" them make the transformation latter, if
> > necessary?
> >
> > That's one idea.
> >
> > Best,
> > Daniel
> >
> >
> Thanks for the reply, I may be able to use this approach in future. But
> there are already many entries in the table and so an SQL statement
> that
> does it for me would be good!
>
> Andrew
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic