Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to retreive data based on two fields.
Message
 
À
02/03/2004 14:50:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00882388
Message ID:
00882439
Vues:
20
Sure it will. But if you have primary key and site code in separate fields I would just go for two simple indexes on them without any ALLTRIM(... stuff.

>Site code is a seperate field, but not currently indexed. Would it help to index it?
>
>>>I have an application that was single site and had unique inventory numbers as the primary key. The application has to become multi site and the primary key will be ALLTRIM(inventory number) + sitecode (site code is 1 character). For many forms I will need to be able to retieve inventory records ONLY for that site. What is the best way to do this?
>>
>>Hmmm, maybe something like this:
>>
>>SELECT * from mytable where RIGHT(my_primary_key, 1) = "7" && where "7" is the lucky site code :)
>>
>>
>>The better way might be to make the site key the separate indexed field.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform