Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to do a weird ordering of data
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01510568
Message ID:
01510582
Views:
70
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform