In MS SQL Server
CASE WHEN RelateCd LIKE 'E_' THEN 1 WHEN RelateCd LIKE 'S_' THEN 2 ELSE 3 END
you can do similar in VFP with ICASE()
>There is a field called RelateCd, meaning relationship code. If the person is the Insured, he has an E1 in the field, meaning Employee. If a person has an S1, it means Spouse. If it is a child, there will be a C1, C2, C3, and so on in the field. If it is a person living there as a dependent, it'd be something like an "O" or a "D". I am not sure about the latter.
>
>>>I have been asked to order a set of insurance records as follows:
>>>
>>>Insured
>>>Spouse
>>>Child 1 Oldest
>>>Child 2 Next to Oldest
>>>Child 3 Youngest
>>>
>>>I know that I can put the children in order by their birth dates, but how do I order the data to get the Insured Member first and Spouse 2nd and then the children by birth dates? Is this do-able?
>>>
>>>I cannot do a simple index, it appears.
>>>
>>>Cecil
>
>How do you know which is which?
--sb--