Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting of Results from SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144507
Message ID:
00144510
Views:
17
>Using a SQL statement, I extract ten data records on the basis of highest to lowest value. So I might have ten records with $10.00 at the top and $1.00 at the bottom. If there are more than one record with the same value, they need to be listed but in order by a second value, perhaps zip code. Is there a way to implement this inside the SQL statement?

In you ORDER BY clause you can include multiple columns for ordering, either by column name or column number, so

ORDER BY 1, 3, 4

would order by column 1 first, then sub-order by column 3, then coulmn 4, etc.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform