>Try this,
>
>SELECT AT( CustType, 'QWER' ) as OrderField from tablename order by OrderField
Great! I'll have to keep this handy. It's about an order-of-magnitude less code than what I used before: nested IIFs, or a UDF with DO CASE.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)