In my table, I have a field storing book title information. If I have a sql like: select title, .... from books order by title, how can I get the result that would ignore definite and indefinite articles, such as "the" and "a"? Should it be processed on
the database level or on the application level? How?
Member
65 Points
204 Posts
ignore articles in sorting
Apr 17, 2015 04:42 PM|comego|LINK
In my table, I have a field storing book title information. If I have a sql like: select title, .... from books order by title, how can I get the result that would ignore definite and indefinite articles, such as "the" and "a"? Should it be processed on the database level or on the application level? How?
All-Star
52683 Points
15721 Posts
Re: ignore articles in sorting
Apr 17, 2015 08:51 PM|oned_gk|LINK
Try ORDER BY REPLACE(Title,'the','')
Suwandi - Non Graduate Programmer
Member
65 Points
204 Posts
Re: ignore articles in sorting
Apr 20, 2015 11:26 AM|comego|LINK
Thanks, Not perfect, but good enough for me. The problem is dealing with the article "A".