Re: Alphabetizing book titles

2001-11-14 Thread Bill Adams
001 2:03 AM > > To: [EMAIL PROTECTED] > > Subject: Re: Alphabetizing book titles > > > > > > Hi. > > > > Try this: > > > > SELECT title FROM titles > > ORDER BY > > IF(SUBSTRING(title,1,4)="The ",SUBSTRING(title,5), &g

RE: Alphabetizing book titles

2001-11-13 Thread Christian Stromberger
IL PROTECTED] > Subject: Re: Alphabetizing book titles > > > Hi. > > Try this: > > SELECT title FROM titles > ORDER BY > IF(SUBSTRING(title,1,4)="The ",SUBSTRING(title,5), > IF(SUBSTRING(title,1,2)="A ",SUBSTRING(title,3), > IF(S

Re: Alphabetizing book titles

2001-11-13 Thread Denis Rudakov
Hi. Try this: SELECT title FROM titles ORDER BY IF(SUBSTRING(title,1,4)="The ",SUBSTRING(title,5), IF(SUBSTRING(title,1,2)="A ",SUBSTRING(title,3), IF(SUBSTRING(title,1,3)="An ",SUBSTRING(title,4), title))); But in version 3.23.36 the next: SELECT title FROM titles ORDER

Re: Alphabetizing book titles

2001-11-01 Thread Paul DuBois
At 1:09 PM -0500 11/1/01, Ian M. Evans wrote: >Back when I was working with MSSQL I needed to alphabetize movie titles in >the proper library format where 'A' 'An" and 'The" are ignored. > >For MSSQL I was told to use: >select * from titles order by case when title like 'The %' then substring >(ti

Alphabetizing book titles

2001-11-01 Thread Ian M. Evans
Back when I was working with MSSQL I needed to alphabetize movie titles in the proper library format where 'A' 'An" and 'The" are ignored. For MSSQL I was told to use: select * from titles order by case when title like 'The %' then substring (title, 5, 255) when title like 'A %' then substring (t