Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00466702
Message ID:
00466797
Vues:
7
I found the problem. I was giving the same name to the field in my cursor as the original table - sele val(xyz) as xyz. Once I changed this - sele val(xyz) as abc - it worked fine. It doesn't do this in your sample if I change to xyz to cField, though. Well, that's odd.

Regards,

E.R.

>>It looks like the sort is happening before the val conversion because negative numbers aren't at the top. Is there anything I can do in the SQL statement to make this work correctly?
>
>Works fine for me:
>
>
CREATE CURSOR temp1 (cField c(10))
>APPEND BLANK
>REPLACE cField WITH '3'
>APPEND BLANK
>REPLACE cField WITH '2'
>APPEND BLANK
>REPLACE cField WITH '-1'
>APPEND BLANK
>REPLACE cField WITH '9'
>SELECT VAL(cfield) as xyz FROM temp1 ORDER BY xyz
>
>Shows, -1, 2, 3, 9 for me.
Regards,

E.R. Gilmore
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform