Author: shawkins
Date: 2009-11-25 15:23:42 -0500 (Wed, 25 Nov 2009)
New Revision: 1599
Modified:
trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
Log:
TEIID-251 TEIID-873 added support for order by expressions and removing parsing
restrictions that limited quoted identifiers.
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
===================================================================
---
trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2009-11-25
19:19:14 UTC (rev 1598)
+++
trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2009-11-25
20:23:42 UTC (rev 1599)
@@ -46,17 +46,28 @@
</para>
</listitem>
<listitem>
+ <para>Identifiers in double quotes can have any contents.
+ The double quote character can it's be escaped with an additional double
quote. e.g. "some "" id"
+ </para>
+ </listitem>
+ <listitem>
<para> Because different data sources organize tables in different
ways, some prepending catalog or schema or user information,
- Teiid allows the 'table_spec' to be a dot-delimited construct.
+ Teiid allows table specification to be a dot-delimited construct.
</para>
</listitem>
<listitem>
- <para> Identifiers are not case-sensitive in Teiid.</para>
+ <para> When a table specification contains a dot resolving will allow for
the match of
+ a partial name against any number of the end segments in the name.
+ </para>
</listitem>
<listitem>
- <para>The separate parts of an identifier can be quoted, with double
quotes. This is not required, but some tools do this automatically. Quotes establish
another level of grouping, in addition to the dot delimiters. Quotes should not be used in
such a way that the table specification, which may itself have multiple parts, is split
between two quoted sections.</para>
+ <para> Columns, schemas, and aliases identifiers cannot contain a dot.
+ </para>
</listitem>
+ <listitem>
+ <para> Identifiers, even when quoted, are not case-sensitive in
Teiid.</para>
+ </listitem>
</itemizedlist>
<itemizedlist>
<para> Some examples of valid fully-qualified table identifiers are:
@@ -774,15 +785,14 @@
</para>
<para>
Usage:
- <synopsis label="Usage">ORDER BY column1 [ASC|DESC],
...</synopsis>
+ <synopsis label="Usage">ORDER BY expression [ASC|DESC],
...</synopsis>
</para>
<itemizedlist>
<para>Syntax Rules:
</para>
<listitem>
<para>Sort columns may be specified positionally by a 1 based
- integer or string literal, by SELECT clause alias name, or by a column
- reference.</para>
+ integer, by SELECT clause alias name, by SELECT clause expression, or by an
unrelated expression.</para>
</listitem>
<listitem>
<para>Column references may appear in the SELECT clause as the
@@ -793,6 +803,11 @@
clause.</para>
</listitem>
<listitem>
+ <para>Unrelated expressions, expressions not appearing as an aliased
expression in the select clause,
+ are allowed in the order by clause of a non-set QUERY. The columns referenced
in the expression must also follow the prior rule.
+ </para>
+ </listitem>
+ <listitem>
<para>The ORDER BY columns must be of a comparable type.</para>
</listitem>
<listitem>