db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r382282 - in /db/derby/docs/trunk/src/ref: rrefbuiltinteger.dita rrefsqlj38716.dita rrefsqlj66113.dita
Date Thu, 02 Mar 2006 03:48:15 GMT
Author: jta
Date: Wed Mar  1 19:48:13 2006
New Revision: 382282

URL: http://svn.apache.org/viewcvs?rev=382282&view=rev
Log:
DERBY-627 Apply Jeff Levitt's patch that corrects the return type for
the COUNT functions in the Reference manual.

Modified:
    db/derby/docs/trunk/src/ref/rrefbuiltinteger.dita
    db/derby/docs/trunk/src/ref/rrefsqlj38716.dita
    db/derby/docs/trunk/src/ref/rrefsqlj66113.dita

Modified: db/derby/docs/trunk/src/ref/rrefbuiltinteger.dita
URL: http://svn.apache.org/viewcvs/db/derby/docs/trunk/src/ref/rrefbuiltinteger.dita?rev=382282&r1=382281&r2=382282&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefbuiltinteger.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefbuiltinteger.dita Wed Mar  1 19:48:13 2006
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "reference.dtd">
 <!-- 
 Copyright 1997, 2005 The Apache Software Foundation or its licensors, as applicable.  
 
@@ -14,43 +16,39 @@
 See the License for the specific language governing permissions and  
 limitations under the License.
 -->
-<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN" "../dtd/reference.dtd">
-<reference xml:lang="en-us" id="rrefbuiltinteger">
+<reference id="rrefbuiltinteger" xml:lang="en-us">
 <title>INTEGER</title>
 <prolog><metadata>
-<keywords><indexterm>INTEGER function</indexterm>
-</keywords>
-</metadata>
-</prolog><refbody>
+<keywords><indexterm>INTEGER function</indexterm></keywords>
+</metadata></prolog>
+<refbody>
 <section>The INTEGER function returns an integer representation of a number,
 character string, date, or time in the form of an integer constant.</section>
-<refsyn><title>Syntax</title>
-<codeblock><b>INT[EGER] (<i>NumericExpression</i> | <i>CharacterExpression</i>
) </b></codeblock>
-<dl>
-<dlentry><dt>NumericExpression</dt>
+<refsyn><title>Syntax</title> <codeblock><b>INT[EGER] (<i>NumericExpression</i>
| <i>CharacterExpression</i> ) </b></codeblock> <dl>
+<dlentry>
+<dt>NumericExpression</dt>
 <dd>An expression that returns a value of any built-in numeric data type.
 If the argument is a numeric-expression, the result is the same number that
 would occur if the argument were assigned to a large integer column or variable.
 If the whole part of the argument is not within the range of integers, an
-error occurs. The decimal part of the argument is truncated if present.</dd></dlentry>
-<dlentry><dt>CharacterExpression</dt>
+error occurs. The decimal part of the argument is truncated if present.</dd>
+</dlentry><dlentry>
+<dt>CharacterExpression</dt>
 <dd>An expression that returns a character string value of length not greater
 than the maximum length of a character constant. Leading and trailing blanks
 are eliminated and the resulting string must conform to the rules for forming
 an SQL integer constant. The character string cannot be a long string. If
 the argument is a character-expression, the result is the same number that
 would occur if the corresponding integer constant were assigned to a large
-integer column or variable.</dd></dlentry>
-</dl>
-<p>The result of the function is a large integer. If the argument can be null,
-the result can be null; if the argument is null, the result is the null value.</p>
-</refsyn>
-<example>
-<p>Using the EMPLOYEE table, select a list containing salary (SALARY) divided
-by education level (EDLEVEL). Truncate any decimal in the calculation. The
-list should also contain the values used in the calculation and employee number
-(EMPNO). The list should be in descending order of the calculated value:
-<codeblock><b>SELECT INTEGER</b> (SALARY / EDLEVEL), SALARY, EDLEVEL, EMPNO
+integer column or variable.</dd>
+</dlentry></dl> <p>The result of the function is a large integer. If the
argument
+can be null, the result can be null; if the argument is null, the result is
+the null value.</p> </refsyn>
+<example> <p>Using the EMPLOYEE table, select a list containing salary (SALARY)
+divided by education level (EDLEVEL). Truncate any decimal in the calculation.
+The list should also contain the values used in the calculation and employee
+number (EMPNO). The list should be in descending order of the calculated value: <codeblock><b>SELECT
INTEGER</b> (SALARY / EDLEVEL), SALARY, EDLEVEL, EMPNO
 <b>FROM</b> EMPLOYEE
-<b>ORDER BY</b> 1 <b>DESC</b></codeblock></p>
-</example></refbody></reference>
+<b>ORDER BY</b> 1 <b>DESC</b></codeblock></p> </example>
+</refbody>
+</reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj38716.dita
URL: http://svn.apache.org/viewcvs/db/derby/docs/trunk/src/ref/rrefsqlj38716.dita?rev=382282&r1=382281&r2=382282&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj38716.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj38716.dita Wed Mar  1 19:48:13 2006
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "reference.dtd">
 <!-- 
 Copyright 1997, 2005 The Apache Software Foundation or its licensors, as applicable.  
 
@@ -14,31 +16,28 @@
 See the License for the specific language governing permissions and  
 limitations under the License.
 -->
-
-<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
- "../dtd/reference.dtd">
 <reference id="rrefsqlj38716" xml:lang="en-us">
 <title>COUNT</title>
 <prolog><metadata>
-<keywords><indexterm>COUNT aggregate function</indexterm></keywords>
+<keywords><indexterm>COUNT aggregate function</indexterm><indexterm>DISTINCT<indexterm>qualifier
+in COUNT aggregate function</indexterm></indexterm></keywords>
 </metadata></prolog>
 <refbody>
 <section> <p>COUNT is an aggregate function that counts the number of rows
 accessed in an expression (see <xref href="rrefsqlj33923.dita#rrefsqlj33923"></xref>).
 COUNT is allowed on all types of expressions.</p></section>
-<refsyn><title>Syntax</title> <codeblock><b>COUNT ( [ DISTINCT
| ALL ] <i>Expression</i> ) </b></codeblock> <p><indexterm>DISTINCT<indexterm>qualifier
-in COUNT aggregate function</indexterm></indexterm>The DISTINCT qualifier
-eliminates duplicates. The ALL qualifier retains duplicates. ALL is assumed
-if neither ALL nor DISTINCT is specified. For example, if a column contains
-the values 1, 1, 1, 1, and 2, COUNT(col) returns a greater value than COUNT(DISTINCT
-col).</p> <p>Only one DISTINCT aggregate expression per <i><xref href="rrefselectexpression.dita#rrefselectexpression">SelectExpression</xref></i>
is
-allowed. For example, the following query is not allowed:</p> <codeblock><b><ph>--
query not allowed</ph>
+<refsyn><title>Syntax</title><codeblock><b>COUNT ( [ DISTINCT
| ALL ] <i>Expression</i> ) </b></codeblock><p>The
+DISTINCT qualifier eliminates duplicates. The ALL qualifier retains duplicates.
+ALL is assumed if neither ALL nor DISTINCT is specified. For example, if a
+column contains the values 1, 1, 1, 1, and 2, COUNT(col) returns a greater
+value than COUNT(DISTINCT col).</p><p>Only one DISTINCT aggregate expression
+per <i><xref href="rrefselectexpression.dita#rrefselectexpression">SelectExpression</xref></i>
is
+allowed. For example, the following query is not allowed:</p><codeblock><b><ph>--
query not allowed</ph>
 SELECT COUNT (DISTINCT flying_time), SUM (DISTINCT miles)
-FROM Flights</b></codeblock> <p>An <i>Expression</i> can contain
multiple
-column references or expressions, but it cannot contain another aggregate
-or subquery. If an <i>Expression</i> evaluates to NULL, the aggregate is not
-processed for that value.</p> <p>The resulting data type of COUNT is <xref
-href="rrefsqlj30435.dita#rrefsqlj30435">BIGINT</xref>.</p> </refsyn>
+FROM Flights</b></codeblock><p>An <i>Expression</i> can contain
multiple column
+references or expressions, but it cannot contain another aggregate or subquery.
+If an <i>Expression</i> evaluates to NULL, the aggregate is not processed
+for that value.</p><p>The resulting data type of COUNT is <xref href="rrefbuiltinteger.dita#rrefbuiltinteger">INTEGER</xref>.</p>
</refsyn>
 <example> <codeblock><b><ph>-- Count the number of countries in each
region,
 -- show only regions that have at least 2</ph>
 SELECT COUNT (country), region
@@ -47,4 +46,3 @@
 HAVING COUNT (country) &gt; 1</b></codeblock> </example>
 </refbody>
 </reference>
-

Modified: db/derby/docs/trunk/src/ref/rrefsqlj66113.dita
URL: http://svn.apache.org/viewcvs/db/derby/docs/trunk/src/ref/rrefsqlj66113.dita?rev=382282&r1=382281&r2=382282&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj66113.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj66113.dita Wed Mar  1 19:48:13 2006
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "reference.dtd">
 <!-- 
 Copyright 1997, 2005 The Apache Software Foundation or its licensors, as applicable.  
 
@@ -14,9 +16,6 @@
 See the License for the specific language governing permissions and  
 limitations under the License.
 -->
-
-<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
- "../dtd/reference.dtd">
 <reference id="rrefsqlj66113" xml:lang="en-us">
 <title>COUNT(*)</title>
 <prolog><metadata>
@@ -26,11 +25,10 @@
 <section> <p>COUNT(*) is an aggregate function that counts the number of rows
 accessed. No NULLs or duplicates are eliminated. COUNT(*) does not operate
 on an expression.</p></section>
-<refsyn><title>Syntax</title> <codeblock><b>COUNT(*)</b></codeblock>
<p>The
-resulting data type is <xref href="rrefsqlj30435.dita#rrefsqlj30435">BIGINT</xref>.</p>
</refsyn>
+<refsyn><title>Syntax</title><codeblock><b>COUNT(*)</b></codeblock><p>The
+resulting data type is <xref href="rrefbuiltinteger.dita#rrefbuiltinteger">INTEGER</xref>.</p>
</refsyn>
 <example> <codeblock><b><ph>-- Count the number of rows in the Flights
table</ph>
 SELECT COUNT(*)
 FROM Flights</b></codeblock> </example>
 </refbody>
 </reference>
-



Mime
View raw message