Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compound index with two integer fields
Message
 
 
À
05/04/2000 09:34:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00355330
Message ID:
00356004
Vues:
23
It would be best to go to the width of the number field, so if you have
field1 N 5,0 and field 2 n 5,0
and a value in field1 of 1234 and a value in field2 of 456 you would have a key of 0123400456 if you lead padded or 1234045600 trailing . Doing this prevents addition cuasing duplicate values.
f1 = 1234 + f2 = 1234 = key = 2468 = f1 2000 + f2 = 468

In our case, f1 alwasy has 4 character (YYYY) but f2 has up to 5 didgits 1-99999
so a key would be 2000000123 or 1999000123
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform