I\'m trying to sort a list of titles, but currently there\'s a giant block of titles which start with \'The \'. I\'d like the \'The \' to be ignored, and the sort to work o
The best way to handle this would be to have a column that contains the value you want to use specifically for ordering output. Then you'd just have to use:
SELECT t.title
FROM MOVIES t
ORDER BY t.order_title
There are going to be various rules about what should and should not be used to order titles.
Based on your example, an alternative would be to use something like:
SELECT t.title
FROM MOVIES t
ORDER BY SUBSTR(t.title, INSTR(t.title, 'The '))
You could use a CASE statement to contain the various rules.