Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to retreive data based on two fields.
Message
 
To
02/03/2004 14:50:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00882388
Message ID:
00882439
Views:
19
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
Previous
Reply
Map
View

Click here to load this message in the networking platform