"Jeff" <do*********@all.ukwrote in message
news:Jq*****************@newsread3.news.pas.earthl ink.net...
I have a list like this:
Reckless Engineer
St Bonaventures
The Blue Mountain
The Croft
The Cube Club
The Folk house
I'd like to reorder that ignoring the leading "The".
How do I do that?
Jeff
Here is something I posted a while back. It will work for you if you
understand it.
CREATE TABLE Titles(
Title varchar(100));
INSERT INTO TITLES VALUES('The World According to
Garp'),('Casablanca'),('The Day After Tomorrow');
SELECT
CASE
WHEN SUBSTRING(Title,1,4) = 'The '
THEN CONCAT(SUBSTRING(Title,5,LENGTH(Title) - 4),',The')
ELSE Title
END as T
FROM
Titles
ORDER BY T ASC