Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to Combine Ascending and Descending Indexes
Message
From
24/02/1999 03:30:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00190759
Message ID:
00190826
Views:
18
>Greetings!
>
>I need to set up an index to sort records using a mix of ascending and descending orders, using character fields.
>
>I recall this could be done using the SYS(15) function ("included for backward compatibility"). I've done it before, but now do not remember how! Apparently, the list of fields in the sort order would include something like "SYS(15, "ZYXW...", field)". This would cause the field to be sorted in descending order by substituting each character--a "Z" for an "A", "Y" for "B", and so forth.
>
>However, it does not work. Does anyone else know how to do this?
>
>Thanks!
>
>Michael Reynolds
Michael,
sys(15) was for char. translation table but at the end what would you get ? You just try to have a descending index ?
AAAAAA
BBBBBB
CCCCCC
sorted as :
CCCCCC
BBBBBB
AAAAAA ? If what you want is this simple then index has a keyword descending. OTOH you can use any index descending by using "descending" keyword of "set order".
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform