Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 1.93 KB

File metadata and controls

27 lines (24 loc) · 1.93 KB
title Parameterized Commands with Intervening COMPUTE Commands | Microsoft Docs
ms.prod sql
ms.prod_service connectivity
ms.technology connectivity
ms.custom
ms.date 01/19/2017
ms.reviewer
ms.topic conceptual
helpviewer_keywords
data shaping [ADO], parameterized commands
parameterized commands [ADO]
APPEND clause [ADO]
COMPUTE command [ADO]
ms.assetid 732f624f-8900-4608-9815-194302d22e8b
author MightyPen
ms.author genemi

Parameterized Commands with Intervening COMPUTE Commands

A typical parameterized shape APPEND command has a clause that creates a parent Recordset with a query command and another clause that creates a child Recordset with a parameterized query command - that is, a command containing a parameter placeholder (a question mark, "?"). The resulting shaped Recordset has two levels, in which the parent occupies the upper level and the child occupies the lower level.

The clause that creates the child Recordset may now be an arbitrary number of nested shape COMPUTE commands, where the most deeply nested command contains the parameterized query. The resulting shaped Recordset has multiple levels, in which the parent occupies the uppermost level, the child occupies the lowermost level, and an arbitrary number of Recordsets generated by the shape COMPUTE commands occupy the intervening levels.

The typical use for this feature is to invoke the aggregate function and grouping abilities of shapeCOMPUTE commands to create intervening Recordset objects with analytical information about the child Recordset. Furthermore, because this is a parameterized shape command, each time a chapter column of the parent is accessed, a new child Recordset may be retrieved. Because the intervening levels are derived from the child, they also will be recomputed.

See Also

Data Shaping Example