Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ORDER BY question
Message
De
27/04/2007 19:02:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01220656
Message ID:
01220670
Vues:
20
>>>
>>>Why can't you use a query with ORDER BY?
>>
>>I can. But the query with ORDER BY on the initial cursor will be of a different name. And this will lead to making a bunch of changes in the code. So I was trying to stay with the same cursor name to avoid making other changes.
>>
>>I don't know if you read what Naomi said, but she thinks that the initial ORDER BY should work.
>>
>>I will have to run some tests.
>>
>>Thank you for your help.
>
>The initial order by persists when you do SET ORDER TO on the cursor. Test it, it's easy <g>

It does not seem to work for me.

Here is what I did:

I created a cursor using SQL Select with WHERE 1=0 and READWRITE and ORDER BY FLD1, FLD2

Then I added (appended a bunch of records) each one with value in FLD1 in descending order. That is, e.g. "99", "88", "77".

Then I browsed the cursor and it does not put the records in the ORDER BY FLD1 but rather in the order as I added the records.

Do you see what I mean?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform