Example 1: >>clear A >>FIND A CUSTOMERS where CUST# eq A00173,A05072 >>MATCH A CUSTOMERS thru CUST# with SALES >>MATCH A SALES thru ITEM# with INVENTORY >>RELATE A CUSTOMERS (SALES thru CUST# (INVENTORY thru ITEM#)) over CUST# ITEM# >>rpr a cust# item# Cust# Item# ------ ------ A00173 A00173 I20981 I20981 A00173 I00798 I00798 A00173 I00161 I00161 A05072 A05072 I01001 I01001 A05072 I00029 I00029 A05072 I01280 I01280When the /R option is included with the ddlRpr() function, the record number and table name are prefixed to the data display for each record. This is demonstrated in Example 2:
Example 2: >>rpr/r a cust# item# Rec TableName Cust# Item# --- ------------- ------ ------ 3 CUSTOMERS A00173 609 SALES A00173 I20981 20 INVENTORY I20981 610 SALES A00173 I00798 22 INVENTORY I00798 611 SALES A00173 I00161 21 INVENTORY I00161 1 CUSTOMERS A05072 1 SALES A05072 I01001 1 INVENTORY I01001 6 SALES A05072 I00029 19 INVENTORY I00029 10 SALES A05072 I01280 3 INVENTORY I01280In most cases, the /R output is adequate for viewing the hierarchy. However, with the addition of RIGHT OUTER JOIN and FULL OUTER JOIN options to the ddlRelate() API function, the resulting hierarchies become more complex.
Example 3: >>rpr/h/r a cust# item# Rec TableName Hinfo Cust# Item# --- ------------ ----- ------ ------ 3 CUSTOMERS 1+ 0 A00173 609 SALES 2 A00173 I20981 20 INVENTORY 3 - I20981 610 SALES 2+ 1 A00173 I00798 22 INVENTORY 3 - I00798 611 SALES 2+ 1 A00173 I00161 21 INVENTORY 3 - I00161 1 CUSTOMERS 1+ 0 A05072 1 SALES 2 A05072 I01001 1 INVENTORY 3 - I01001 6 SALES 2+ 1 A05072 I00029 19 INVENTORY 3 - I00029 10 SALES 2+ 1 A05072 I01280 3 INVENTORY 3 - I01280
Copyright © 2019 , WhamTech, Inc. All rights reserved. This
document is provided for information purposes only and the contents hereof are
subject to change without notice. Names may be
trademarks of their respective owners.