Professional Documents
Culture Documents
The system supports the creation of tables, loops, and lists from DB data. You can
also create nested tables up to 6 levels. For nested tables, fetching data in JSON
and XML formats through SQL queries is advisable. Take the example of "Order
table".
Sales Order Order Status
12345 5
-- --
Below is the query that populates this table. It fetches the data in XML format.
SELECT Cust.CustomerID,
OrderHeader.SalesOrderID,
OrderHeader.Status,
Cust.CustomerName
FROM Sales.Customer Cust, Sales.SalesOrderHeader OrderHeader
WHERE Cust.CustomerID = OrderHeader.CustomerID
ORDER BY Cust.CustomerID
FOR XML AUTO, ELEMENTS
SELECT CustomerID,
CustomerName,
(SELECT SalesOrderID, Status
FROM salesOrderHeader AS D
WHERE H.CustomerID = D.CustomerID
FOR JSON PATH) AS D
FROM Customer AS H
FOR JSON PATH