CHAPTER 12 – Databases
Note:
Grouped Parent Related to Grouped Child example:
SHAPE
(SHAPE
APPEND ((SHAPE {select orders.*, year(orderdate) as OrderYear,
COMPUTE rsCustomers
BY
region
Page 216
The missing BY clause in the outer summary. This defines the Grand Total
because the parent rowset contains a single record with the grand total and a pointer
to the child recordset.
{select * from customers}
month(orderdate) as OrderMonth from orders} AS rsOrders
COMPUTE rsOrders
BY customerid, OrderYear, OrderMonth)
RELATE customerid TO customerid) AS rsOrdByMonth )
AS rsCustomers
OMRON
Release 2.0