Customizing Table Sorting in the Geodatabase
This post was written by James MacKay, a product engineer on the geodatabase team who also played the leading role in the "Programming with the geodatabase API" sessions at this years user conference.
In ArcGIS there are a number of different ways a column within a table can be sorted. For the majority of use cases the default sorting options provided in ArcGIS will work fine. In a handful of situations, however, the default sort options do not sort the information in a logical way.
Consider the following case, a table containing civic address numbers with suffixes in a string:

The default column sorting will arrange the values in alpha-numeric order. For civic addresses this doesn't really make sense. To get around this a table sorting can be programmatically customized.
The SDK article, How to sort tables, has been expanded for the 9.3 release to show how to implement a custom comparison class which can be provided to the ITableSort interface to handle situations like this.