Message
From
01/12/2006 06:27:08
 
 
To
17/11/2006 12:47:31
General information
Fórum:
Visual FoxPro
Category:
Programação, sintaxe e comandos
Título:
Miscellaneous
ID da thread:
01170759
ID da mensagem:
01174037
Views:
14
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.
lcZip = CHRTRAN( MyAlias.ZipCode, CHRTRAN( MyAlias.ZipCode, [0123456789], [] ), [] )
But that still does not ensure that the zip code is valid. You need to obtain some kind of valid zip code table to validate your data.

If you require valid addresses, then you need some type of third party tool like Accumail.
Previous
Responder
Mapa
View