Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to do a weird ordering of data
Message
De
13/05/2011 11:22:33
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01510568
Message ID:
01510607
Vues:
53
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform