Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select SQL and ORDER BY...defective?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00337312
Message ID:
00337970
Vues:
11
>But I still don't understant why
>Select... ORDER BY CLT_CODE,DATE works and
>Select... ORDER BY DATE,CLT_CODE does not work.

VFP is doing exactly what you are telling it to do. The ORDER BY CLT_CODE, DATE tells the query to order the records by code first and if there are duplicate entries of code then order those by date.

The second one is ordering by date. If there are duplicate date entries then those records are ordered by code.

Secondary orders are only used if duplicate records are found using the primary sort order. If you don't specify a secondary order then the record number or physical order in the table is used to sort the records.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform