Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ORDER BY versus INDEX ON...issues?
Message
From
11/08/2004 11:16:16
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
ORDER BY versus INDEX ON...issues?
Miscellaneous
Thread ID:
00932358
Message ID:
00932358
Views:
58
Greetings!

I have a local view in a VFP8 SP1 application that joins a few tables and orders by three character fields of length 30, 15 and 60. The sequence is perfect when I order the view in that manner. However, when I add an index to the view at runtime with the same exact sort order, the sequence it not what you think it would be.

Anyone else had any issues like this? It is really bizarre and a key issue, since I want to allow the user to view reports in multiple sort orders by simple selecting a sort order from a pull-down menu. This works fine in other circumstanecs...I believe. I'll double check that to be sure. Here's an example of the data:

1) fld1 = "AAA" fld2 = "" fld3 = ""
2) fld1 = "AAA" fld2 = "AAA" fld3 = ""
3) fld1 = "AAA" fld2 = "AAA" fld3 = "AAA"
4) fld1 = "BBB" fld2 = "BBB" fld3 = "BBB"
5) fld1 = "CCC" fld2 = "" fld3 = ""

indexing on fld1 + fld2 + fld3 you would think would give the order I posted. It doesn't. It orders like this:

1) AAA
5) CCC
2) AAA AAA
3) AAA AAA AAA
4) BBB BBB BBB

Any thoughts or ideas would be greatly appreciated!

Thanks in advance!
Next
Reply
Map
View

Click here to load this message in the networking platform