Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format fields as Text or Numeric
Message
De
15/03/2013 22:22:19
 
 
À
15/03/2013 22:20:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01568565
Message ID:
01568566
Vues:
46
>Question: if you have a columnn of unique numbers (ie: sku or sn), is it better to format that field as text or numeric?
>Thanks, Randy


Depends on several factors. Will you be using that key with other items? If so, then it's more straight-forward to maintain an index with something like:
INDEX ON sku+otherField TAG main
Than it is to do:
INDEX ON STR(sku,6,0)+otherField TAG main
Some people are die hard fanatics about always using integers for their unique/primary key fields. In my experience, it depends on the application, the nature of your data, the type of users/customers you'll have on the app ... many factors.

The short version is this: The solution has to make sense for the size and scope of the application. Designing a little system for an office staff of five people requires significantly different design strategies than does designing a system to work for Facebook.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform