Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting records
Message
From
07/06/2001 15:51:19
 
 
To
07/06/2001 15:44:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00516592
Message ID:
00516601
Views:
9
>Hello,
>How can I sort records by XS, SM, Med, LG, XL? Using the order tab by ascending gets me LG, Med, SM, XL, XS. Using the order tab by descending gets me XS, XL, Sm, Med, LG (the XL is in the wrong order). Can I create my own sort pattern?
>
>Thanks.

Joseph,

Create a sorting table -- SizeSort with 2 fields -- Size and SortOrder, and populate SortOrder with the desired sort.

Then,
SELECT * FROM SizedStuff ;
   INNER JOIN SizeSort ON SizedStuff.Size = SizeSort.Size ;
ORDER BY SizeSort.SortOrder
Jay
Previous
Reply
Map
View

Click here to load this message in the networking platform