Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a bad zipcode
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01170759
Message ID:
01170807
Views:
10
>I have a character field zip c(5) containing zipcodes. I need to set a filter to select the bad entries which contain alpha characters. This is done in Access code using the LIKE function (not like('#####'), but VFP handles LIKE differently. This would also seem to be a simple matter but I can't seem to find the answer. I could find a bad entry by parsing the values but that doesn't serve my need to set a filter.
>
>Any thoughts?

Not real elegant - but - gets the job done (I think...)

SET FILTER TO ;
ISALPHA(LEFT(zip,1)) OR ;
ISALPHA(RIGHT(zip,1)) OR ;
ISALPHA(RIGHT(LEFT(zip,2),1)) OR ;
ISALPHA(RIGHT(LEFT(zip,3),1)) OR ;
ISALPHA(RIGHT(LEFT(zip,4),1))
Previous
Reply
Map
View

Click here to load this message in the networking platform