Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple sorting on 2-dimensional arrays
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00188684
Message ID:
00188839
Vues:
15
Thanks, Ed!

(I think I also just learned a new word -QUAD! Cool!)

Mark

>The QUAD way I do this is to construct a cursor with the right number of columns, append the data from the array, and then do a SQL SELECT back to the original array ordered as desired.
>
>Assuming both columns were character fields:
>
>
CREATE CURSOR SortArray (Col1 C(254), Col2 C(254)
>APPEND from ARRAY aMyArray
>RELEASE aMyArray
>SELECT ALLTRIM(Col1), ALLTRIM(Col2) FROM SortArray INTO ARRAY aMyArray ORDER BY Col1, Col2
>USE
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform