Information générale
Titre:
ORDER BY versus INDEX ON...issues?
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!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement