I have a table in MS SQL Server 2008 with a varchar column called WONO. For most records, the value of this field is a padded-on-the-left string representation of an integer, such as:
' 384564'
However in some cases there is a non-integer value in the field. I want to select the record with the greatest integer in the WONO column, ignoring those that don't have an integer there. What's the select statement for this?