In my SQL Server 7 database, one of the tables has a column containing records such as:
31S00220
68S00221
11S00222
48T00223
What I want to do here is order the reocrds by the last five characters in the string (as I've done in the example above). I assume the query will be a variation on the usual 'SELECT Column1,Column2 FROM Table ORDER BY Column1', but how would I change the ORDER part to have it look at the last five characters? Do I have any options for this in SQL?
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
31S00220
68S00221
11S00222
48T00223
What I want to do here is order the reocrds by the last five characters in the string (as I've done in the example above). I assume the query will be a variation on the usual 'SELECT Column1,Column2 FROM Table ORDER BY Column1', but how would I change the ORDER part to have it look at the last five characters? Do I have any options for this in SQL?
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)