Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field withone chercter and rest are number
Message
From
18/10/2002 04:55:07
 
 
To
17/10/2002 17:08:45
Liam O'Hagan
O'Hagan Programming Ltd
Ireland
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00712598
Message ID:
00712749
Views:
6
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform