Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to do a weird ordering of data
Message
From
13/05/2011 11:22:33
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
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:
01510607
Views:
52
>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

Assuming "Insured" and "Spouse" are logical fields, and there is a field for BirthDate (D):

SELECT ... ORDER BY insured DESC, spouse DESC, BirthDate
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform