2.2.3.10 CT_Result

Target namespace: http://schemas.microsoft.com/office/accessservices/2009/11/application

Referenced by: CT_Results

Specifies one or more columns (1) of data to be included in the Results of a Query.

The specification is for one column (1) of data from a single input source (that is, the All attribute is false and the Name and Source attributes are present), all columns (1) from a single input source (that is, All is true and Source is present), all columns (1) from all input sources (that is, All is true and Source is not present), or a single expression (that is, an Expression child element is present).

Child Elements:

Expression : A CT_Expression element that specifies a single expression to be included in the query results. The expression MUST be evaluated per row in the results. This element MUST NOT be present if the Source or Name attribute is present or if the All attribute is true. When this attribute is present, the Alias attribute MUST also be present.

Attributes:

Alias : An ST_ObjectName attribute that specifies an alias for a column (1) in the query results. This attribute MUST NOT be present if the All attribute is set to true. This attribute MUST be present if an Expression child element is present. The value MUST be unique among all Alias attribute values under the Results collection.

If the same single column (1) of data is specified by more than one Result element in a Results collection, not including Result elements where the All attribute is true, then either all or all but one Result element that specifies the column by including both a Source attribute and a Name attribute MUST have an Alias attribute present.

All : A boolean ([XMLSCHEMA2/2] section 3.2.2) attribute. If this attribute is true and the Source attribute is present, then the query results MUST contain all columns (1) from the input source indicated by the Source attribute. If this attribute is true and the Source attribute is not present, then the query results MUST contain all columns (1) from all input sources listed in the References collection. When this attribute is true, the Expression child element, the Name attribute, and the Alias attribute MUST NOT be present.

Name : An ST_LongString attribute that specifies one column (1) from the input source specified by the Source attribute. The data from that column (1) MUST be included in the query results. This attribute MUST NOT be present if the All attribute is set to true or if an Expression child element is present.

Source : An ST_ObjectName attribute that specifies the name or alias of one of the input sources to the query. This attribute MUST NOT be present if an Expression child element is present. The input source MUST be listed in the References collection of the query. If the Reference element specifying the input source contains an Alias value, then this attribute MUST be that value.

The following W3C XML Schema ([XMLSCHEMA1/2] section 2.1) fragment specifies the contents of this complex type.

 <xsd:complexType name="CT_Result">
   <xsd:all>
     <xsd:element name="Expression" type="CT_Expression" minOccurs="0" wbld:cname="Expression"/>
   </xsd:all>
   <xsd:attribute name="Source" type="ST_ObjectName" wbld:cname="Source" use="optional"/>
   <xsd:attribute name="Name" type="ST_LongString" wbld:cname="Name" use="optional"/>
   <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
   <xsd:attribute name="All" type="xsd:boolean" default="false" wbld:cname="All" use="optional"/>
 </xsd:complexType>

See section 5.4 for the full W3C XML Schema ([XMLSCHEMA1/2] section 2.1).