Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To, Tricky Index
Message
 
 
To
25/10/2005 08:40:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01061827
Message ID:
01061830
Views:
17
>I have a customer that would like to have a report sorted the following way:
>
>cStandard c(30),cAudit_Type c(30), Number_of_Days Desc n(3,0)
>
>I can't seem to figure out how to do it. They would like the cStandard and cAudit_Type to be in ascending order but the Number_Of_Days to be in descending order within the audit type grouping. Is this possible?

Why bother with index?
SELECT * ;
  FROM whtatever ;
  ORDER BY cStandard, cAudit_Type, Number_of_Days DESC ;
  INTO CURSOR crsRep

* If you've to use index
INDEX ON cStandard +  cAudit_Type + PADL(INT(9999-Number_of_Days),5) TAG whatever
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform