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 12:44:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00882388
Message ID:
00882390
Views:
16
>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
Next
Reply
Map
View

Click here to load this message in the networking platform