Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field withone chercter and rest are number
Message
 
 
À
17/10/2002 17:08:45
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00712598
Message ID:
00712749
Vues:
7
Hi!

IsAlpha ignores the rest of characters, so it will be simpler. Also, to index by number, better use val(). When yous till use string, keep in mind that all key values should be teh same length (that is not supported in your expression). So, you can use reliably eitehr of following expressions:

val(iif(IsAlpha(fieldname), Substr(fieldname,2), fieldname)) && numeric type


OR

iif(IsAlpha(fieldname), Substr(fieldname,2)+" ", fieldname) && string type

If values are integer, I would recommend also use BintoC() function.

Take care! :-)


>Hi Bill
>
>
>Index On Iif(IsAlpha(Substr(fieldname,1,1)), Substr(fieldname,2), fieldname) tag sometag
>
>
>Liam
>
>
>>Hi all
>>
>>I have filed that start with contains a character and then numbers and I want that it should be sorted on the number, but some times it has only a number with out any characters so I do id it
>>
>>thanx all
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform