Created
July 3, 2013 21:53
-
-
Save AlexPashley/5923186 to your computer and use it in GitHub Desktop.
SQL: exclude "The", "An, "A" from results list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT artist_name | |
FROM artists | |
ORDER BY TRIM( | |
LEADING "A " | |
FROM TRIM( | |
LEADING "An " | |
FROM TRIM( | |
LEADING "The " | |
FROM LOWER( artist_name ) ) ) ) | |
LIMIT 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment