Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple sorting on 2-dimensional arrays
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00188684
Message ID:
00188839
Views:
16
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform