Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order by character vs numeric
Message
De
18/10/2009 18:41:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/10/2009 06:14:30
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 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01429769
Message ID:
01429797
Vues:
43
>Hi all,
>I need to order a cursor by a character field that contains numeric values (1,3,4,5,5bis,7..and so on). I cannot change the type of the field, but i want that number 5bis and 6 has a order before than 13. Some trick?
>Thanx

If it is for a report, I would create a calculated field:
select cast(MyCharField as I) as MyNumber, *;
  from MyTable;
  order by 1;
  into cursor Temp
report form ...
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform