• I liked the question, I've had to debug a piece of code that was doing this technique. While not failing from a illegal datatype conversion, it was doing the wrong sort because the implicit conversion yielded the wrong value.

    Good question, it's a helpful (if not particularly fast) sorting technique.

    I've found this useful in the SQL behind an SSRS report. The report parameters lets the user choose the sort, the report passes this into the SQL, and the SQL lets the database do the sort.