You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2006/08/07 23:33:34 UTC

svn commit: r429484 - in /db/derby/docs/trunk/src/ref: rrefselectexpression.dita rrefsqlj1083019.dita

Author: rhillegas
Date: Mon Aug  7 14:33:34 2006
New Revision: 429484

URL: http://svn.apache.org/viewvc?rev=429484&view=rev
Log:
DERBY-402: Commit derby-402_v02.diff, correcting the Reference Guide's description of how columns are named for UNION/INTERSECT/EXCEPT.

Modified:
    db/derby/docs/trunk/src/ref/rrefselectexpression.dita
    db/derby/docs/trunk/src/ref/rrefsqlj1083019.dita

Modified: db/derby/docs/trunk/src/ref/rrefselectexpression.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefselectexpression.dita?rev=429484&r1=429483&r2=429484&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefselectexpression.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefselectexpression.dita Mon Aug  7 14:33:34 2006
@@ -87,11 +87,8 @@
 to all columns in the identified table. That table must be listed in the associated
 FROM clause.</p> </section>
 <section><title>Naming columns</title> <p>You can name a <i>SelectItem</i> column
-using the AS clause. When the <i>SelectExpression</i> appears in a UNION,
-INTERSECT, or EXCEPT operator,  the names from the first <i>SelectExpression</i> are
-taken as the names for the columns in the result of the operation. If a column
-of a <i>SelectItem</i> is not a simple <i>ColumnReference</i> expression or
-named with an AS clause, it is given a generated unique name.</p> <p>These
+using the AS clause. If a column of a <i>SelectItem</i> is not a simple <i>ColumnReference</i> expression
+or named with an AS clause, it is given a generated unique name.</p><p>These
 column names are useful in several cases:   <ul>
 <li>They are made available on the JDBC <i>ResultSetMetaData</i>.</li>
 <li>They are used as the names of the columns in the resulting table when

Modified: db/derby/docs/trunk/src/ref/rrefsqlj1083019.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj1083019.dita?rev=429484&r1=429483&r2=429484&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj1083019.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj1083019.dita Mon Aug  7 14:33:34 2006
@@ -77,11 +77,7 @@
 -- of the :</ph></b></codeblock></li>
 <li>A dynamic parameter is allowed as an item in the values list or select
 list of an INSERT statement. The type of the dynamic parameter is assumed
-to be the type of the target column. A ? parameter is not allowed by itself
-in any select list, including the select list of a subquery, unless there
-is a corresponding column in a UNION, INTERSECT, or EXCEPT (see no. <xref
-href="rrefsqlj1083019.dita#rrefsqlj1083019/sqlj20756">16</xref>, below) that
-is not dynamic.   <codeblock><b>INSERT INTO t VALUES (?)
+to be the type of the target column.<codeblock><b>INSERT INTO t VALUES (?)
 <ph>-- dynamic parameter assumed to be the type
 -- of the only column in table t</ph>
 INSERT INTO t SELECT ?
@@ -113,15 +109,6 @@
 <ph>-- is valid. Dynamic parameter assumed to be INTEGER type</ph>
 1 = SOME (SELECT ? FROM t)
 <ph>-- is valid. Dynamic parameter assumed to be INTEGER type.</ph></b></codeblock></li>
-<li id="sqlj20756">A dynamic parameter is allowed to represent a column if
-it appears in a UNION, INTERSECT, or EXCEPT expression; <ph conref="refconrefs.dita#prod/productshortname"></ph> can
-infer the data type from the corresponding column in the expression.   <codeblock><b>SELECT ?
-FROM t
-UNION SELECT 1
-FROM t
-<ph>-- dynamic parameter assumed to be INT</ph>
-VALUES 1 UNION VALUES ?
-<ph>-- dynamic parameter assumed to be INT</ph></b></codeblock></li>
 <li>A dynamic parameter is allowed as the left operand of an IS expression
 and is assumed to be a boolean.</li>
 </ol></p></section>