| title | Formal Shape Grammar | 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 |
|
||
| ms.assetid | ea691475-0f03-4abe-a785-b77e77712d1d | ||
| author | MightyPen | ||
| ms.author | genemi |
This is the formal grammar for creating any shape command:
-
Required grammatical terms are text strings delimited by angle brackets ("<>").
-
Optional terms are delimited by square brackets ("[ ]").
-
Alternatives are indicated by a virgule ("|").
-
Repeating alternatives are indicated by an ellipsis ("...").
-
Alpha indicates a string of alphabetical letters.
-
Digit indicates a string of numbers.
-
Unicode-digit indicates a string of unicode digits.
All other terms are literals.
| Term | Definition |
|---|---|
| <shape-command> | SHAPE [<table-exp> [[AS] <alias>]][<shape-action>] |
| <table-exp> | {<provider-command-text>} | (<shape-command>) | TABLE <quoted-name> | <quoted-name> |
| <shape-action> | APPEND <aliased-field-list> | COMPUTE <aliased-field-list> [BY <field-list>] |
| <aliased-field-list> | <aliased-field> [, <aliased-field...>] |
| <aliased-field> | <field-exp> [[AS] <alias>] |
| <field-exp> | (<relation-exp>) | <calculated-exp> | <aggregate-exp> | <new-exp> |
| <relation_exp> | <table-exp> [[AS] <alias>] RELATE <relation-cond-list> |
| <relation-cond-list> | <relation-cond> [, <relation-cond>...] |
| <relation-cond> | <field-name> TO <child-ref> |
| <child-ref> | <field-name> | PARAMETER <param-ref> |
| <param-ref> | <number> |
| <field-list> | <field-name> [, <field-name>] |
| <aggregate-exp> | SUM(<qualified-field-name>) | AVG(<qualified-field-name>) | MIN(<qualified-field-name>) | MAX(<qualified-field-name>) | COUNT(<qualified-alias> | <qualified-name>) | STDEV(<qualified-field-name>) | ANY(<qualified-field-name>) |
| <calculated-exp> | CALC(<expression>) |
| <qualified-field-name> | <alias>.[<alias>...]<field-name> |
| <alias> | <quoted-name> |
| <field-name> | <quoted-name> [[AS] <alias>] |
| <quoted-name> | "<string>" | '<string>' | [<string>] | <name> |
| <qualified-name> | alias[.alias...] |
| <name> | alpha [ alpha | digit | _ | # | : | ...] |
| <number> | digit [digit...] |
| <new-exp> | NEW <field-type> [(<number> [, <number>])] |
| <field-type> | An OLE DB or ADO data type. |
| <string> | unicode-char [unicode-char...] |
| <expression> | A Visual Basic for Applications expression whose operands are other non-CALC columns in the same row. |
Accessing Rows in a Hierarchical Recordset
Data Shaping Overview
Required Providers for Data Shaping
Shape APPEND Clause
Shape Commands in General
Shape COMPUTE Clause
Visual Basic for Applications functions