Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing a city,state zip field
Message
 
 
À
31/07/2001 14:55:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00537937
Message ID:
00537957
Vues:
11
This message has been marked as the solution to the initial question of the thread.
If there are no digits in the city and state name than
lcStr = "Wayne, NJ 07470"
? PADR(CHRTRAN( lcStr, CHRTRAN( lcStr, "0123456789", ""), ""),9)
* otherwise
? PADR( SUBSTR(ALLTRIM(lcStr), RAT(SPACE(1), ALLTRIM(lcStr))+1) ,9)
>I need an example via fox sql, of (if any) pulling the zip-code out of a city,state zip field unfortunately the data has been captured in this one field for years and I need to break it out. There are no constants i.e. (city, state zip), (city state zip), (city-state-zip) or (city, state zip). The zip can be from 5 to 9 numbers in char. Help : )
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform