EasyManuals Logo

Omron CX-SUPERVISOR - V2.0 User Manual

Omron CX-SUPERVISOR - V2.0
370 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #237 background imageLoading...
Page #237 background image
CHAPTER 12 – Databases OMRON
Page 214 Release 2.0
Compound Relation Hierarchy example:
This sample illustrates a three-level hierarchy of customers, orders, and order details:
SHAPE {SELECT * from customers}
APPEND ((SHAPE {select * from orders}
APPEND ({select * from [order details]} AS rsDetails
RELATE orderid TO orderid)) AS rsOrders
RELATE customerid TO customerid)
In addition to the Simple Relation Hierarchy example, the Order ID is now used to create a recordset
containing the order details for the shown order.
Hierarchy with Aggregate example:
SHAPE (select * from orders}
APPEND ({select od.orderid, od.UnitPrice * od.quantity as
ExtendedPrice
from [order details] As od}
RELATE orderid TO orderid) As rsDetails,
SUM(ExtendedPrice) AS OrderTotal
This example creates a Recordset of all the orders and their details, and adds a field called
ExtendedPrice to store the total order value for each record, and sums all the ExtendedPrice values
which is stored in Order Total.
Group Hierarchy example:
SHAPE {select customers.customerid AS cust_id, orders.*
from customers inner join orders on customers.customerid =
orders.customerid} AS rsOrders
COMPUTE rsOrders BY cust_id
Group Hierarchy with Aggregate example:
SHAPE
(SHAPE {select customers.*, orders.orderid, orders.orderdate from
customers inner join orders on customers.customerid =
orders.customerid}
APPEND ({select od.orderid,
od.unitprice * od.quantity as ExtendedPrice from [order details]
as od} AS rsDetails
RELATE orderid TO orderid),

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-SUPERVISOR - V2.0 and is the answer not in the manual?

Omron CX-SUPERVISOR - V2.0 Specifications

General IconGeneral
BrandOmron
ModelCX-SUPERVISOR - V2.0
CategorySoftware
LanguageEnglish

Related product manuals