I have a column in an SQL Server 2000 table. When running a SELECT against this table, this column is always returned as it is a very intregal part of the rest of the query.

I now need to include a filter on this column. Here is an example of the data in the column.

00002063020092R
00002063020091R
00002063020090O
00003063020091R
00003063020090O
00004093020096R
00004093020093R
00004093020091R
00004093020090O
00005123120096R
00005123120095R
00005123120094R
00005123120091R
00005123120090O
00007063020091R
00007063020090O
00008063020092R
00008063020091R
00008063020090O
00011093020096R
00011093020092R
00011093020091R
00011093020090O
00014063020092R
00014063020091R
00014063020090O
00016123120093R
00016123120091R
00016123120090O
00016123120090M
This goes on for several thousand rows.

The filter I need to implement deals with the first 5 characters and their relationship to the 14th character. From a group I need to extract the largest number (character 14) from within that group (the first five characters) within a single SELECT query.

Example:

This
00002063020092R
00002063020091R
00002063020090O
00003063020091R
00003063020090O
00004093020096R
00004093020093R
00004093020091R
00004093020090O
00005123120096R
00005123120095R
00005123120094R
00005123120091R
00005123120090O

Should return only
00002063020092R
00003063020091R
00004093020096R
00005123120096R

The return represents this highest revision of its particular group (as represented by the first five characters.)

I don't even know where to start.