Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VAL( ) function error messages
Message
De
19/10/1999 14:07:56
Jorge Haro
Independent Consultant
Juarez, Mexique
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00278344
Message ID:
00278360
Vues:
20
Why do you need it as a numeric value?, if you create the tag with the character string it will sort it like this:

123A123
123B123
234A234
AAA3AAA
..

It will sort starting with the first character, you can pad with zeros in the tag , padl(field,len(field),"0") to avoid getting a "2" after a "1000" for instance.



>Does anybody know a workaround for the VAL() function to create an index based on the value of a string field that can have numbers and alpha text in it? If you print the val('123A453') you get the value of 123.00 as it stops at the alpha text portion. This is what I want, the value of the beginning number portion of the field. However, when you issue INDEX ON VAL(fldname) TO indexname you get an error message that data was lost and it does not create the index.
>
>Thanks.
>Colombo.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform