2.2.3.18 CT_Query
Target namespace: http://schemas.microsoft.com/office/accessservices/2010/12/application
Referenced by: CT_FormDef, Query
Specifies a Query (section 2.1.3).
Child Elements:
GroupRestriction: A CT_Expression (section 2.2.3.1) element that specifies a filter for groups in the query. All groups included in the query results MUST meet the criteria defined by the group restriction expression.
Groups: A CT_Groups (section 2.2.3.74) element that specifies the groups into which records will be placed in the query results.
Joins: A CT_Joins (section 2.2.3.11) element that specifies all joins in the query.
Ordering: A CT_Ordering (section 2.2.3.3) element that specifies the order of the query results.
Parameters: A CT_Parameters (section 2.2.3.13) element that specifies all parameters in the query.
References: A CT_References (section 2.2.3.7) element that specifies all input sources for the query.
Restriction: A CT_Expression (section 2.2.3.1) element that specifies a filter for the query. All rows included in the query results MUST meet the criteria defined by the restriction expression.
Results: A CT_Results (section 2.2.3.9) element that specifies the columns included in the result of running the query.
TopPercent: A CT_TopPercent (section 2.2.3.77) element that specifies the limit on the percentage of records to be returned as query results.
TopRows: A CT_TopRows (section 2.2.3.76) element that specifies the limit on the number of records to be returned as query results.
Attributes:
Distinct: A boolean ([XMLSCHEMA2] section 3.2.2) attribute. If this attribute is true, then the query results MUST contain only unique rows.
Name: An ST_ObjectName (section 2.2.4.1) attribute that specifies the name of the query. SHOULD be present when CT_Query (section 2.2.3.18) is used as a child element for CT_FormDef (section 2.2.3.81). SHOULD NOT be present when the CT_Query (section 2.2.3.18) is the top element of the document.
The following W3C XML Schema ([XMLSCHEMA1/2] section 2.1) fragment specifies the contents of this complex type.
-
<xsd:complexType name="CT_Query"> <xsd:sequence> <xsd:choice minOccurs="0"> <xsd:element name="TopRows" type="CT_TopRows" wbld:cname="TopRows"/> <xsd:element name="TopPercent" type="CT_TopPercent" wbld:cname="TopPercent"/> </xsd:choice> <xsd:element name="Parameters" minOccurs="0" type="CT_Parameters" wbld:cname="Parameters"/> <xsd:element name="References" type="CT_References" wbld:cname="References"/> <xsd:element name="Results" type="CT_Results" wbld:cname="Results"/> <xsd:element name="Joins" minOccurs="0" type="CT_Joins" wbld:cname="Joins"/> <xsd:element name="Restriction" type="CT_Expression" minOccurs="0" wbld:cname="Restriction"/> <xsd:element name="Groups" minOccurs="0" type="CT_Groups" wbld:cname="Groups"/> <xsd:element name="GroupRestriction" minOccurs="0" type="CT_Expression" wbld:cname="GroupRestriction"/> <xsd:element name="Ordering" minOccurs="0" type="CT_Ordering" wbld:cname="Ordering"/> </xsd:sequence> <xsd:attribute name="Name" type="ST_ObjectName" wbld:cname="Name" use="optional"/> <xsd:attribute name="Distinct" type="xsd:boolean" wbld:cname="Distinct" use="optional"/> </xsd:complexType>
See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1/2] section 2.1).