>...a really basic, dummy kind of question...
Not a dummy question at all, though it is a fundamental issue.
>
>SELECT ORDERS
>SET ORDER TO TAG cust_id
>SELECT CUSTOMERS
>SET RELATION TO cust_id INTO ORDERS
>
>
>QUESTIONS:
>in the "SET RELATION to cust_id INTO ORDERS" command, is the cust_id
>referring to ORDERS.cust_id or to CUSTOMERS.cust_id or to the ORDERS index tag cust_id ?
Cust_id in the SET RELATION command refers to the Cust_Id field in Customers. In fact, you can use an expression, not just a field name, there.
What the command says, in essence is "Create a link between the table in the current work area and the named alias. Do it by setting up an automatic look-up of the expression in the SET RELATION command into the current index order of the named alias."
IOW, it's as if you did a SEEK in the specified table each time you move the record pointer. That's why the child table has to be indexed on the relevant tag.
>if the parent field name is "customer_id" and the child field (or index?)
>name is "cust_id" ... how would i write the SET RELATION command ?
You can probably answer this yourself now, but it would be:
SET RELATION TO customer_id INTO Orders
Tamar