Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting records
Message
 
To
07/06/2001 15:44:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00516592
Message ID:
00516602
Views:
11
>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.
SELECT ;
    IIF(size = "XS",1, ;
    IIF(size = "SM",2, ;
    IIF(size = "Med",3, ;
    IIF(size = "LG",4, ;
    IIF(size = "XL",5,0))))) AS OrderCol ;
  FROM test ;
  ORDER BY OrderCol
Brien R. Givens

Brampwood Systems
Previous
Reply
Map
View

Click here to load this message in the networking platform