Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Integer indexing doesn't fly so well
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01470116
Message ID:
01470130
Views:
97
This message has been marked as the solution to the initial question of the thread.
Your index is no good because
5+1 = 4+2 = 3+3 and so on
INDEX ON BINTOC(groupid) + BINTOC(lineitem) TAG grpqteline
>Well, I have approached this from several vantage points to get the line item numbers
>in numeric order, but they do not come out okay when I make my index as follows:
>
>
>INDEX on PADL(ALLTRIM(STR(groupid)), "") + PADL(ALLTRIM(STR(quoteid)), 4, " ") + ;
>   PADL(ALLTRIM(STR(lineitem)), 4, " ") TAG gqteline
>
>
>Example: The numbers for the column called LineItem just don't go into any order.
>I even padded spaces in, but that didn't fix it.
>
>
>GROUPID  QUOTEID  LINEITEM
>1               1               2
>1               2               1
>
>
>How do I get the numbers to come out like this in the index expression?
>
>GROUPID  QUOTEID  LINEITEM
>1               2               1
>1               1               2
>
>
>Maybe I need to leave out the QuoteID? I'll try that.
>
>Cecil answering Cecil's question: "Yes, that works just fine, Cecil. Good job!" See below:
>
>INDEX on groupid + lineitem TAG grpqteline
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform