Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper syntax for a compound join
Message
 
To
28/07/1999 12:23:48
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00247208
Message ID:
00247465
Views:
23
Walter,

If the combination of two fields comprises the primary key of a table, then those two fields should be in an index together so records can be found with a simple seek. Joins are based on the relationship of the primary key of one table and the foreign key in another table.

The issue of data types is irrelavent. Data conversions are possible.

WHERE STR(CustNo,10,0) + STR(InvNo,10,0) = ...

WHERE DTOS(DateField) + STR(InvNo,10,0) = ...

etc. etc. etc.

Using an AND in a JOIN condition is more complicated in my opinion as it conceals the PK and FK values.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform