Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting addresses w/PO Boxes treated numerically
Message
De
17/08/2006 02:38:46
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Sorting addresses w/PO Boxes treated numerically
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01146266
Message ID:
01146266
Vues:
57
Hi all,

I'm looking for advice, before i reinvent the wheel, about creating an index on an address field for a temporary table, so that PO boxes will sort by their numeric value, for instance:

1234 Terrice Drive
P. O. BOX 1
P. O. BOX 3
P. O. BOX 3 PPP
P. O. BOX 3 Quartermaster Road
P. O. BOX 4
P. O. BOX 10

etc.

The PO Box addresses are guaranted to start with "P. O. BOX"

I can sort properly all numeric only PO Box addressess, with:

INDEX on IIF( mas_address1 = "P. O. BOX", "P. O. Box " + padl(INT(VAL(SUBSTR(mas_address1, 10))),10), mas_address1) TO testnew

But the addresses with text after the number give me trouble.

Anyone already doing this?

TIA! J
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform