• Thanks, that looks great. However, the number can become 2 decimal places, so I thought something like:

    select ('S'+CAST ([statusId] AS VARCHAR(255))) as sid from tbl_xenix

    order by CHARINDEX(sid,'S5S4')

    but it says 'sid' is an invalid column, despite the fact its in the column header if I miss out the 'order by' !

    Any clues?