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 jt...@apache.org on 2006/09/07 22:28:24 UTC

svn commit: r441209 - /db/derby/docs/trunk/src/ref/

Author: jta
Date: Thu Sep  7 13:28:22 2006
New Revision: 441209

URL: http://svn.apache.org/viewvc?view=rev&rev=441209
Log:
DERBY-1821 :  Fixed minor formatting, typos, and examples in the Reference Guide.

Patch DERBY-1821_20060906.diff by Myrna van Lunteren <m....@gmail.com>.

Modified:
    db/derby/docs/trunk/src/ref/rrefdeclaretemptable.dita
    db/derby/docs/trunk/src/ref/rrefscalarsubquery.dita
    db/derby/docs/trunk/src/ref/rrefselectexpression.dita
    db/derby/docs/trunk/src/ref/rrefsqlj11277.dita
    db/derby/docs/trunk/src/ref/rrefsqlj13658.dita
    db/derby/docs/trunk/src/ref/rrefsqlj14854.dita
    db/derby/docs/trunk/src/ref/rrefsqlj18922.dita
    db/derby/docs/trunk/src/ref/rrefsqlj21571.dita
    db/derby/docs/trunk/src/ref/rrefsqlj21583.dita
    db/derby/docs/trunk/src/ref/rrefsqlj26498.dita
    db/derby/docs/trunk/src/ref/rrefsqlj31783.dita
    db/derby/docs/trunk/src/ref/rrefsqlj32654.dita
    db/derby/docs/trunk/src/ref/rrefsqlj33602.dita
    db/derby/docs/trunk/src/ref/rrefsqlj35034.dita
    db/derby/docs/trunk/src/ref/rrefsqlj35981.dita
    db/derby/docs/trunk/src/ref/rrefsqlj40506.dita
    db/derby/docs/trunk/src/ref/rrefsqlj40774.dita
    db/derby/docs/trunk/src/ref/rrefsqlj41360.dita
    db/derby/docs/trunk/src/ref/rrefsqlj57522.dita
    db/derby/docs/trunk/src/ref/rreftableexpression.dita
    db/derby/docs/trunk/src/ref/rreftablesubquery.dita

Modified: db/derby/docs/trunk/src/ref/rrefdeclaretemptable.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefdeclaretemptable.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefdeclaretemptable.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefdeclaretemptable.dita Thu Sep  7 13:28:22 2006
@@ -58,7 +58,7 @@
 more information on <codeph>column-definition</codeph>. <codeph>DECLARE GLOBAL
 TEMPORARY TABLE</codeph> does not allow <codeph>generated-column-spec</codeph> in
 the <codeph>column-definition</codeph>.</p></section>
-<section id="rreftemptabledatatype"><title>Data-type</title><p>Supported data-types
+<section id="rreftemptabledatatype"><title>Data type</title><p>Supported data types
 are: <ul>
 <li>BIGINT</li>
 <li>CHAR</li>

Modified: db/derby/docs/trunk/src/ref/rrefscalarsubquery.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefscalarsubquery.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefscalarsubquery.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefscalarsubquery.dita Thu Sep  7 13:28:22 2006
@@ -29,7 +29,7 @@
 query must evaluate to a single row with a single column.</p> <p><indexterm>Expression
 subquery</indexterm>Sometimes also called an expression subquery.</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>(<i><xref href="rrefsqlj21571.dita#rrefsqlj21571">Query</xref></i>)</b></codeblock> </refsyn>
-<example> <codeblock><b><ph>-- avg always returns a single value, so the subquery is
+<example><title>Examples</title><codeblock><b><ph>-- avg always returns a single value, so the subquery is
 -- a ScalarSubquery</ph>
 SELECT NAME, COMM
   FROM STAFF
@@ -38,14 +38,14 @@
        FROM EMPLOYEE
        WHERE COMM &lt; 5000
        AND EMPLOYEE.LASTNAME = UPPER(STAFF.NAME)
-);
+)
 <ph>-- Introduce a way of "generating" new data values,
 -- using a query which selects from a VALUES clause (which is an 
-alternate form of a fullselect). 
+-- alternate form of a fullselect). 
 -- This query shows how a table can be derived called "X" having 
-2 columns "R1" and "R2" and 1 row of data.
+-- 2 columns "R1" and "R2" and 1 row of data.
 SELECT R1,R2 
-	FROM (VALUES('GROUP 1','GROUP 2')) AS X(R1,R2);</ph>
+	FROM (VALUES('GROUP 1','GROUP 2')) AS X(R1,R2)</ph>
 </b></codeblock> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefselectexpression.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefselectexpression.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefselectexpression.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefselectexpression.dita Thu Sep  7 13:28:22 2006
@@ -61,7 +61,7 @@
 SELECT WORKDEPT, AVG(SALARY)
      FROM EMPLOYEE
      GROUP BY WORKDEPT
-     ORDER BY 1;</b></codeblock></p> <p>If there is no GROUP BY clause, but
+     ORDER BY 1</b></codeblock></p> <p>If there is no GROUP BY clause, but
 a <i>SelectItem</i> contains an aggregate not in a subquery, the query is
 implicitly grouped. The entire table is the single group.</p> <p>The HAVING
 clause restricts a grouped table, specifying a search condition (much like
@@ -106,10 +106,10 @@
 WHERE t.TABLENAME = 'FLIGHTS' AND t.TABLEID = col.
 REFERENCEID AND t.TABLEID = cons.TABLEID 
 AND cons.CONSTRAINTID = checks.CONSTRAINTID 
-ORDER BY CONSTRAINTNAME;
+ORDER BY CONSTRAINTNAME
 <ph>-- This example shows the use of the DISTINCT clause</ph>
 SELECT DISTINCT ACTNO
-FROM EMP_ACT;
+FROM EMP_ACT
 <ph>-- This example shows how to rename an expression 
 -- Using the EMPLOYEE table, list the department number (WORKDEPT) and 
 -- maximum departmental salary (SALARY) renamed as BOSS 
@@ -121,6 +121,6 @@
 	HAVING MAX(SALARY) &lt; (SELECT AVG(SALARY)
 				FROM EMPLOYEE
 				WHERE NOT WORKDEPT = EMP_COR.WORKDEPT) 
-	ORDER BY BOSS;</b></codeblock> </example>
+	ORDER BY BOSS</b></codeblock> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj11277.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj11277.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj11277.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj11277.dita Thu Sep  7 13:28:22 2006
@@ -44,14 +44,14 @@
 the column's default value into the column. Another way to insert the default
 value into the column is to omit the column from the column list and only
 insert values into other columns in the table.</p> </refsyn>
-<example> <codeblock><b><ph>-- 3 rows of 1 column</ph>
-VALUES (1),(2),(3);
+<example><title>Examples</title><codeblock><b><ph>-- 3 rows of 1 column</ph>
+VALUES (1),(2),(3)
 <ph>-- 3 rows of 1 column</ph>
-VALUES 1, 2, 3; 
+VALUES 1, 2, 3 
 <ph>-- 1 row of 3 columns</ph>
-VALUES (1, 2, 3);
+VALUES (1, 2, 3)
 <ph>-- 3 rows of 2 columns</ph>
-VALUES (1,21),(2,22),(3,23);
+VALUES (1,21),(2,22),(3,23)
 <ph>-- constructing a derived table</ph>
 VALUES ('orange', 'orange'), ('apple', 'red'),
 ('banana', 'yellow')
@@ -62,7 +62,7 @@
     ('E41', 'DATABASE ADMINISTRATION', 'E01')
 <ph>-- insert a row with a DEFAULT value for the MAJPROJ column</ph>
 INSERT INTO PROJECT (PROJNO, PROJNAME, DEPTNO, RESPEMP, PRSTDATE, MAJPROJ) 
-VALUES ('PL2101', 'ENSURE COMPAT PLAN', 'B01', '000020', CURRENT_DATE, DEFAULT);
+VALUES ('PL2101', 'ENSURE COMPAT PLAN', 'B01', '000020', CURRENT_DATE, DEFAULT)
 
 <ph>-- using a built-in function</ph>
 VALUES CURRENT_DATE

Modified: db/derby/docs/trunk/src/ref/rrefsqlj13658.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj13658.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj13658.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj13658.dita Thu Sep  7 13:28:22 2006
@@ -52,9 +52,8 @@
 </refsyn>
 <example>
 <codeblock><b>-- order by the correlation name NATION
--- order by the correlation name NATION
 SELECT CITY_NAME, COUNTRY AS NATION 
 FROM CITIES 
-ORDER BY NATION;
+ORDER BY NATION
 </b></codeblock>
 </example></refbody></reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj14854.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj14854.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj14854.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj14854.dita Thu Sep  7 13:28:22 2006
@@ -39,7 +39,7 @@
 <codeblock><b>-- SELECT COUNT(*)
 -- FROM SAMP.STAFF
 -- GROUP BY ID
--- HAVING SALARY &gt; 15000;</b></codeblock></p>
+-- HAVING SALARY &gt; 15000</b></codeblock></p>
 <p>Aggregates in the HAVING clause do not need to appear in the SELECT list.
 If the HAVING clause contains a subquery, the subquery can refer to the outer
 query block if and only if it refers to a grouping column.</p>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj18922.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj18922.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj18922.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj18922.dita Thu Sep  7 13:28:22 2006
@@ -24,7 +24,7 @@
 </metadata></prolog>
 <refbody>
 <section> <p>A LEFT OUTER JOIN is one of the <xref href="rrefsqlj29840.dita#rrefsqlj29840">JOIN
-operations</xref>s that allow you to specify a join clause. It preserves the
+operations</xref> that allow you to specify a join clause. It preserves the
 unmatched rows from the first (left) table, joining them with a NULL row in
 the shape of the second (right) table.</p></section>
 <refsyn><title>Syntax</title><codeblock><b><i><xref href="rreftableexpression.dita#rreftableexpression">TableExpression</xref></i> LEFT [ OUTER ] JOIN <i
@@ -41,7 +41,7 @@
 FROM Countries 
 LEFT OUTER JOIN Cities
 ON CITIES.COUNTRY_ISO_CODE = COUNTRIES.COUNTRY_ISO_CODE
-WHERE REGION = 'Asia';
+WHERE REGION = 'Asia'
 
 <b>-- use the synonymous syntax, LEFT JOIN, to achieve exactly 
 -- the same results as in the example above
@@ -50,7 +50,7 @@
 FROM COUNTRIES 
 LEFT JOIN CITIES 
 ON CITIES.COUNTRY_ISO_CODE = COUNTRIES.COUNTRY_ISO_CODE
-WHERE REGION = 'Asia';
+WHERE REGION = 'Asia'
 </codeblock></example>
 <example><title>Example 2</title><codeblock><b>
 -- Join the EMPLOYEE and DEPARTMENT tables, 
@@ -64,7 +64,7 @@
 SELECT EMPNO, LASTNAME, WORKDEPT, DEPTNAME 
    FROM SAMP.EMPLOYEE LEFT OUTER JOIN SAMP.DEPARTMENT 
    ON WORKDEPT = DEPTNO 
-   AND YEAR(BIRTHDATE) &lt; 1930;
+   AND YEAR(BIRTHDATE) &lt; 1930
 
 <b>-- List every department with the employee number and 
 -- last name of the manager,
@@ -72,6 +72,6 @@
 </b>
 SELECT DEPTNO, DEPTNAME, EMPNO, LASTNAME
       FROM DEPARTMENT LEFT OUTER JOIN EMPLOYEE
-	    ON MGRNO = EMPNO;</codeblock> </example>
+	    ON MGRNO = EMPNO</codeblock> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj21571.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj21571.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj21571.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj21571.dita Thu Sep  7 13:28:22 2006
@@ -57,15 +57,15 @@
 </ul></p></section>
 <example><title>Examples</title><codeblock><b><ph>-- a Select expression </ph>
 SELECT *
-FROM ORG;
+FROM ORG
 
 <ph>-- a subquery </ph>
 SELECT *
-FROM (SELECT CLASS_CODE FROM CL_SCHED) AS CS;
+FROM (SELECT CLASS_CODE FROM CL_SCHED) AS CS
 
 -- a subquery
 SELECT *
-FROM (SELECT CLASS_CODE FROM CL_SCHED) AS CS (CLASS_CODE);
+FROM (SELECT CLASS_CODE FROM CL_SCHED) AS CS (CLASS_CODE)
 
 <ph>-- a UNION
 -- returns all rows from columns DEPTNUMB and MANAGER 
@@ -75,10 +75,10 @@
 SELECT DEPTNUMB, MANAGER 
 FROM ORG
 UNION ALL
-VALUES (1,2), (3,4);
+VALUES (1,2), (3,4)
 
 <ph>-- a values expression</ph>
-VALUES (1,2,3);</b>
+VALUES (1,2,3)</b>
 <b>-- List the employee numbers (EMPNO) of all employees in the EMPLOYEE table 
 -- whose department number (WORKDEPT) either begins with 'E' or 
 -- who are assigned to projects in the EMP_ACT table 
@@ -89,7 +89,7 @@
   UNION
   SELECT EMPNO
      FROM EMP_ACT
-     WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112');</b>
+     WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112')</b>
 <b>-- Make the same query as in the previous example
 -- and "tag" the rows from the EMPLOYEE table with 'emp' and 
 -- the rows from the EMP_ACT table with 'emp_act'. 
@@ -101,7 +101,7 @@
      WHERE WORKDEPT LIKE 'E%'
   UNION
   SELECT EMPNO, 'emp_act' FROM EMP_ACT
-     WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112');</b>
+     WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112')</b>
 <b>-- Make the same query as in the previous example, 
 -- only use UNION ALL so that no duplicate rows are eliminated
 SELECT EMPNO
@@ -110,7 +110,7 @@
   UNION ALL
   SELECT EMPNO
      FROM EMP_ACT
-     WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112');</b>
+     WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112')</b>
 <b>-- Make the same query as in the previous example, 
 -- only include an additional two employees currently not in any table and 
 -- tag these rows as "new"
@@ -122,6 +122,6 @@
      FROM EMP_ACT
      WHERE PROJNO IN('MA2100', 'MA2110', 'MA2112')
   UNION
-     VALUES ('NEWAAA', 'new'), ('NEWBBB', 'new');</b></codeblock> </example>
+     VALUES ('NEWAAA', 'new'), ('NEWBBB', 'new')</b></codeblock> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj21583.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj21583.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj21583.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj21583.dita Thu Sep  7 13:28:22 2006
@@ -25,7 +25,7 @@
 </metadata></prolog>
 <refbody>
 <section> <p>The FROM clause is a mandatory clause in a <i><xref href="rrefselectexpression.dita#rrefselectexpression">SelectExpression</xref>.</i> It
-specifies the tables (<xref href="rreftableexpression.dita#rreftableexpression">TableExpression</xref>)
+specifies the tables (<i><xref href="rreftableexpression.dita#rreftableexpression">TableExpression</xref></i>)
 from which the other clauses of the query can access columns for use in expressions. </p></section>
 <refsyn><title>Syntax</title> <codeblock><b>FROM TableExpression [ , TableExpression ] *</b></codeblock> </refsyn>
 <example> <codeblock><b>SELECT Cities.city_id
@@ -35,7 +35,7 @@
 SELECT TABLENAME, ISINDEX 
 FROM SYS.SYSTABLES T, SYS.SYSCONGLOMERATES C
 WHERE T.TABLEID = C.TABLEID
-ORDER BY TABLENAME, ISINDEX;
+ORDER BY TABLENAME, ISINDEX
 <ph>-- force the join order</ph>
 SELECT *
 FROM Flights, FlightAvailability
@@ -48,7 +48,7 @@
 FROM COUNTRIES LEFT OUTER JOIN CITIES
 ON COUNTRIES.COUNTRY_ISO_CODE = CITIES.COUNTRY_ISO_CODE
 LEFT OUTER JOIN FLIGHTS
-ON Cities.AIRPORT = FLIGHTS.DEST_AIRPORT;</b></codeblock> </example>
+ON Cities.AIRPORT = FLIGHTS.DEST_AIRPORT</b></codeblock> </example>
 </refbody>
 </reference>
 

Modified: db/derby/docs/trunk/src/ref/rrefsqlj26498.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj26498.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj26498.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj26498.dita Thu Sep  7 13:28:22 2006
@@ -47,19 +47,19 @@
 <p>Specifying
 DEFAULT for the update value sets the value of the column to the default defined
 for that table.</p> </refsyn>
-<example><title>Example</title> <codeblock><b><ph>-- All the employees except the manager of 
-department (WORKDEPT) 'E21' have been temporarily reassigned. 
+<example><title>Example</title> <codeblock><b><ph>-- All the employees except the manager of
+-- department (WORKDEPT) 'E21' have been temporarily reassigned. 
 -- Indicate this by changing their job (JOB) to NULL and their pay
 -- (SALARY, BONUS, COMM) values to zero in the EMPLOYEE table.</ph> 
 UPDATE EMPLOYEE
   SET JOB=NULL, SALARY=0, BONUS=0, COMM=0
   WHERE WORKDEPT = 'E21' AND JOB &lt;&gt; 'MANAGER'
 
--- PROMOTE the job (JOB) of certain employees to MANAGER
+-- PROMOTE the job (JOB) of employees without a specific job title to MANAGER
 UPDATE EMPLOYEE
 	SET JOB = 'MANAGER'
-	WHERE CURRENT OF CURS1;
-<ph>-- Increase the project staffing (PRSTAFF) by 1.5 for all projects</ph>
+	WHERE JOB IS NULL;
+<ph>// Increase the project staffing (PRSTAFF) by 1.5 for all projects</ph>
 stmt.executeUpdate("UPDATE PROJECT SET PRSTAFF = "
 "PRSTAFF + 1.5" +
 "WHERE CURRENT OF" + ResultSet.getCursorName());
@@ -68,7 +68,7 @@
 -- to its DEFAULT value which is NULL</ph>
 UPDATE EMPLOYEE
   SET JOB = DEFAULT
-  WHERE EMPNO = '000290';
+  WHERE EMPNO = '000290'
 </b></codeblock> </example>
 <section><title>Statement dependency system</title> <p>A searched
 update statement depends on the table being updated, all of its conglomerates

Modified: db/derby/docs/trunk/src/ref/rrefsqlj31783.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj31783.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj31783.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj31783.dita Thu Sep  7 13:28:22 2006
@@ -42,7 +42,7 @@
 </refsyn>
 <section>
 <p><note>The use of the FOR UPDATE clause is not mandatory to obtain an updatable 
-JDBC ResultSets. As long as the statement used to generate the JDBC ResultSet meets 
+JDBC ResultSet. As long as the statement used to generate the JDBC ResultSet meets 
 the requirements for updatable cursor, it is sufficient for the JDBC Statement that 
 generates the JDBC ResultSet to have concurrency mode 
 <codeph>ResultSet.CONCUR_UPDATABLE</codeph> for the ResultSet to be updatable.
@@ -52,7 +52,7 @@
 cursors, see <cite><ph
 conref="refconrefs.dita#pub/cittuning"></ph></cite>.</p> 
 </section>
-<example> <codeblock><b>SELECT RECEIVED, SOURCE, SUBJECT, NOTE_TEXT FROM SAMP.IN_TRAY FOR UPDATE;
+<example> <codeblock><b>SELECT RECEIVED, SOURCE, SUBJECT, NOTE_TEXT FROM SAMP.IN_TRAY FOR UPDATE
 </b></codeblock> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj32654.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj32654.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj32654.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj32654.dita Thu Sep  7 13:28:22 2006
@@ -43,7 +43,7 @@
 FROM Flights
 GROUP BY orig_airport
 
-SELECT MAX(city), region
+SELECT MAX(city_name), region
 FROM Cities, Countries
 WHERE Cities.country_ISO_code = Countries.country_ISO_code
 GROUP BY region
@@ -57,7 +57,7 @@
 AVG(OTHERS.SALARY) AS AVGSALARY,
 COUNT(*) AS EMPCOUNT
 FROM SAMP.EMPLOYEE OTHERS
-GROUP BY OTHERS.WORKDEPT;
+GROUP BY OTHERS.WORKDEPT
 </b></codeblock> </example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj33602.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj33602.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj33602.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj33602.dita Thu Sep  7 13:28:22 2006
@@ -37,7 +37,7 @@
 boolean value. </p> <p>In addition, there are the more common boolean expressions.
 Specific boolean operators listed in Table 10, take one or more operands;
 the expressions return a boolean value.</p> </refsyn>
-<example> <codeblock><b>
+<example><title>Example</title><codeblock><b>
 <ph>-- find the flights where no business-class seats have
 -- been booked</ph>
 SELECT *
@@ -50,7 +50,7 @@
 -- to each row of the result.</ph>
 SELECT SAMP.EMP_ACT.*, LASTNAME
   FROM SAMP.EMP_ACT, SAMP.EMPLOYEE
-  WHERE EMP_ACT.EMPNO = EMPLOYEE.EMPNO;
+  WHERE EMP_ACT.EMPNO = EMPLOYEE.EMPNO
 <ph>-- Determine the employee number and salary of sales representatives 
 -- along with the average salary and head count of their departments.
 -- This query must first create a new-column-name specified in the AS clause 
@@ -66,7 +66,7 @@
     GROUP BY OTHERS.WORKDEPT
    )AS DINFO
  WHERE THIS_EMP.JOB = 'SALESREP'
-	   AND THIS_EMP.WORKDEPT = DINFO.DEPTNO;</b></codeblock> </example>
+	   AND THIS_EMP.WORKDEPT = DINFO.DEPTNO</b></codeblock> </example>
 </refbody>
 </reference>
 

Modified: db/derby/docs/trunk/src/ref/rrefsqlj35034.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj35034.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj35034.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj35034.dita Thu Sep  7 13:28:22 2006
@@ -24,7 +24,7 @@
 <keywords><indexterm>INNER JOIN expression</indexterm></keywords>
 </metadata></prolog>
 <refbody>
-<section> <p>An INNER JOIN is a <xref href="rrefsqlj29840.dita#rrefsqlj29840">JOIN operations</xref> that
+<section> <p>An INNER JOIN is a <xref href="rrefsqlj29840.dita#rrefsqlj29840">JOIN operation</xref> that
 allows you to specify an explicit join clause. </p></section>
 <refsyn><title>Syntax</title> <codeblock><b><i><xref href="rreftableexpression.dita#rreftableexpression">TableExpression</xref></i> [ INNER ] JOIN <i
 ><xref href="rreftableexpression.dita#rreftableexpression">TableExpression</xref></i> { ON <i>booleanExpression</i> }</b></codeblock> <p>You can specify the join clause by specifying ON
@@ -34,7 +34,7 @@
 to the current SELECT. In the following example, the ON clause refers to the
 current tables:   <codeblock><b>SELECT *
 FROM SAMP.EMPLOYEE INNER JOIN SAMP.STAFF
-ON EMPLOYEE.SALARY &lt; STAFF.SALARY;
+ON EMPLOYEE.SALARY &lt; STAFF.SALARY
 </b></codeblock></p> <p>The ON clause can reference tables not being joined
 and does not have to reference either of the tables being joined (though typically
 it does). </p> </refsyn>
@@ -44,7 +44,7 @@
 -- to each row of the result
 SELECT SAMP.EMP_ACT.*, LASTNAME
      FROM SAMP.EMP_ACT JOIN SAMP.EMPLOYEE
-     ON EMP_ACT.EMPNO = EMPLOYEE.EMPNO;
+     ON EMP_ACT.EMPNO = EMPLOYEE.EMPNO
 -- Join the EMPLOYEE and DEPARTMENT tables, 
 -- select the employee number (EMPNO), 
 -- employee surname (LASTNAME), 
@@ -55,7 +55,7 @@
 SELECT EMPNO, LASTNAME, WORKDEPT, DEPTNAME 
      FROM SAMP.EMPLOYEE JOIN SAMP.DEPARTMENT 
      ON WORKDEPT = DEPTNO 
-     AND YEAR(BIRTHDATE) &lt; 1930;
+     AND YEAR(BIRTHDATE) &lt; 1930
 
 <ph>-- Another example of "generating" new data values, </ph>
 -- using a query which selects from a VALUES clause (which is an 
@@ -67,20 +67,20 @@
 AS VALUESTABLE1(C1, C2)
 JOIN (VALUES (3, 2), (1, 2),
 (0, 3)) AS VALUESTABLE2(c1, c2)
-ON VALUESTABLE1.c1 = VALUESTABLE2.c1;
-
-This results in:
-<ph>  C1         |C2         |C1         |2
------------------------------------------------
-3          |4          |3          |2
-1          |5          |1          |2
-
+ON VALUESTABLE1.c1 = VALUESTABLE2.c1
+-- This results in:
+-- C1         |C2         |C1         |2
+-- -----------------------------------------------
+-- 3          |4          |3          |2
+-- 1          |5          |1          |2
+ 
+<ph>  
 -- List every department with the employee number and 
 -- last name of the manager</ph>
 
 SELECT DEPTNO, DEPTNAME, EMPNO, LASTNAME
 	FROM DEPARTMENT INNER JOIN EMPLOYEE
-	ON MGRNO = EMPNO;
+	ON MGRNO = EMPNO
 
 <ph>-- List every employee number and last name 
 -- with the employee number and last name of their manager</ph>
@@ -88,7 +88,7 @@
 	FROM EMPLOYEE E INNER JOIN	
 	DEPARTMENT INNER JOIN EMPLOYEE M 
         ON MGRNO = M.EMPNO
-        ON E.WORKDEPT = DEPTNO;</b></codeblock> </example>
+        ON E.WORKDEPT = DEPTNO</b></codeblock> </example>
 </refbody>
 </reference>
 

Modified: db/derby/docs/trunk/src/ref/rrefsqlj35981.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj35981.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj35981.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj35981.dita Thu Sep  7 13:28:22 2006
@@ -36,10 +36,10 @@
 the current row of an open, updatable cursor. For more information
 about updatable cursors, see <xref
 href="rrefsqlj41360.dita#rrefsqlj41360"></xref>.</p></section>
-<section><title>Examples</title> <codeblock><b>DELETE FROM SAMP.IN_TRAY;
+<section><title>Examples</title> <codeblock><b>DELETE FROM SAMP.IN_TRAY
 
 stmt.executeUpdate("DELETE FROM SAMP.IN_TRAY WHERE CURRENT OF " +
-	resultSet.getCursorName())</b></codeblock></section>
+	resultSet.getCursorName());</b></codeblock></section>
 <section><title>Statement dependency system</title>
 <p>A searched delete statement depends on the table being updated,
 all of its conglomerates (units of storage such as heaps or indexes), and

Modified: db/derby/docs/trunk/src/ref/rrefsqlj40506.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj40506.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj40506.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj40506.dita Thu Sep  7 13:28:22 2006
@@ -34,8 +34,8 @@
 </ul></p><p>You cannot lock system tables with this statement.</p></section>
 <refsyn><title>Syntax</title> <codeblock><b>LOCK TABLE <i><xref href="rreftablename.dita#rreftablename">table-Name</xref></i> IN { SHARE | EXCLUSIVE } MODE</b
 ></codeblock><p>Once a table is locked in either mode, a transaction does
-not acquire any subsequent row-level locks on a table. Replace line 13 with
-this: For example, if a transaction locks the entire Flights table in share
+not acquire any subsequent row-level locks on a table. 
+For example, if a transaction locks the entire Flights table in share
 mode in order to read data, a particular statement might need to lock a particular
 row in exclusive mode in order to update the row. However, the previous table-level
 lock on <i>Hotels</i> forces the exclusive lock to be table-level as well.</p><p>If

Modified: db/derby/docs/trunk/src/ref/rrefsqlj40774.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj40774.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj40774.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj40774.dita Thu Sep  7 13:28:22 2006
@@ -43,18 +43,18 @@
 <li>UNION expressions</li>
 </ul></p> <p>For more information about Query, see <xref href="rrefsqlj21571.dita#rrefsqlj21571"></xref>.</p> </refsyn>
 <example> <codeblock><b>INSERT INTO COUNTRIES
-      VALUES ('Taiwan', 'TW', 'Asia');
+      VALUES ('Taiwan', 'TW', 'Asia')
 
 -- Insert a new department into the DEPARTMENT table,
 -- but do not assign a manager to the new department
 INSERT INTO DEPARTMENT (DEPTNO, DEPTNAME, ADMRDEPT)
-	VALUES ('E31', 'ARCHITECTURE', 'E01');
+	VALUES ('E31', 'ARCHITECTURE', 'E01')
 <ph>-- Insert two new departments using one statement 
 -- into the DEPARTMENT table as in the previous example, 
 -- but do not assign a manager to the new department.</ph>
 INSERT INTO DEPARTMENT (DEPTNO, DEPTNAME, ADMRDEPT)
 	VALUES ('B11', 'PURCHASING', 'B01'),
-	('E41', 'DATABASE ADMINISTRATION', 'E01');
+	('E41', 'DATABASE ADMINISTRATION', 'E01')
 <ph>--  Create a temporary table MA_EMP_ACT with the 
 -- same columns as the EMP_ACT table. 
 -- Load MA_EMP_ACT with the rows from the EMP_ACT
@@ -75,12 +75,12 @@
 	WHERE SUBSTR(PROJNO, 1, 2) = 'MA';
 <ph>-- Insert the DEFAULT value for the LOCATION column</ph>
 INSERT INTO DEPARTMENT
-      VALUES ('E31', 'ARCHITECTURE', '00390', 'E01', DEFAULT);
+      VALUES ('E31', 'ARCHITECTURE', '00390', 'E01', DEFAULT)
 </b></codeblock> </example>
 <section><title>Statement dependency system</title> <p>The INSERT
 statement depends on the table being inserted into, all of the conglomerates
 (units of storage such as heaps or indexes) for that table, and any other
-table named in the query. Any statement that creates or drops an index or
+table named in the statement. Any statement that creates or drops an index or
 a constraint for the target table of a prepared INSERT statement invalidates
 the prepared INSERT statement.</p> </section>
 </refbody>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj41360.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj41360.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj41360.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj41360.dita Thu Sep  7 13:28:22 2006
@@ -41,22 +41,22 @@
 SELECT statement using the WITH {RR|RS|CS|UR} syntax.</p></section>
 
 <example><title>Example</title> <codeblock><b><ph>-- lists the names of the expression 
-SAL+BONUS+COMM as TOTAL_PAY and
+-- SAL+BONUS+COMM as TOTAL_PAY and
 -- orders by the new name TOTAL_PAY</ph>
- SELECT FIRSTNME, SALARY+BONUS+COMM AS TOTAL_PAY
+SELECT FIRSTNME, SALARY+BONUS+COMM AS TOTAL_PAY
      FROM EMPLOYEE
-     ORDER BY TOTAL_PAY;
+     ORDER BY TOTAL_PAY
 <ph>-- creating an updatable cursor with a FOR UPDATE clause 
 -- to update the start date (PRSTDATE) and the end date (PRENDATE)
 -- columns in the PROJECT table</ph>
 SELECT PROJNO, PRSTDATE, PRENDATE
       FROM PROJECT
-      FOR UPDATE OF PRSTDATE, PRENDATE;
+      FOR UPDATE OF PRSTDATE, PRENDATE
 <ph>-- set the isolation level to RR for this statement only </ph>
 SELECT * 
 FROM Flights 
 WHERE flight_id BETWEEN 'AA1111' AND 'AA1112' 
-WITH RR;</b></codeblock> <p>A SELECT statement returns a <i>ResultSet</i>.
+WITH RR</b></codeblock> <p>A SELECT statement returns a <i>ResultSet</i>.
 A <i>cursor</i> is a pointer to a specific row in <i>ResultSet</i>. In Java
 applications, all <i>ResultSets</i>  have an underlying associated SQL
 cursor, often referred to as the result set's cursor. The cursor can

Modified: db/derby/docs/trunk/src/ref/rrefsqlj57522.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj57522.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj57522.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj57522.dita Thu Sep  7 13:28:22 2006
@@ -24,7 +24,7 @@
 </metadata></prolog>
 <refbody>
 <section> <p>A RIGHT OUTER JOIN is one of the <xref href="rrefsqlj29840.dita#rrefsqlj29840">JOIN
-operations</xref>s that allow you to specify a JOIN clause. It preserves the
+operations</xref> that allow you to specify a JOIN clause. It preserves the
 unmatched rows from the second (right) table, joining them with a NULL in
 the shape of the first (left) table. A LEFT OUTER JOIN B is equivalent to
 B RIGHT OUTER JOIN A, with the columns in a different order.</p></section>
@@ -42,7 +42,7 @@
 SELECT COUNTRIES.COUNTRY, CITIES.CITY_NAME 
 FROM CITIES 
 RIGHT OUTER JOIN COUNTRIES 
-ON CITIES.COUNTRY_ISO_CODE = COUNTRIES.COUNTRY_ISO_CODE;
+ON CITIES.COUNTRY_ISO_CODE = COUNTRIES.COUNTRY_ISO_CODE
 
 <b>-- get all countries in Africa and corresponding cities, including
 -- countries without any cities
@@ -51,7 +51,7 @@
 FROM CITIES 
 RIGHT OUTER JOIN COUNTRIES 
 ON CITIES.COUNTRY_ISO_CODE = COUNTRIES.COUNTRY_ISO_CODE
-WHERE Countries.region = 'Africa';
+WHERE Countries.region = 'Africa'
 
 <b>-- use the synonymous syntax, RIGHT JOIN, to achieve exactly
 -- the same results as in the example above
@@ -60,7 +60,7 @@
 FROM CITIES 
 RIGHT JOIN COUNTRIES 
 ON CITIES.COUNTRY_ISO_CODE = COUNTRIES.COUNTRY_ISO_CODE
-WHERE Countries.region = 'Africa';
+WHERE Countries.region = 'Africa'
 </codeblock> </example>
 <example><title>Example 2</title><codeblock><b>-- a TableExpression can be a joinOperation. Therefore
 -- you can have multiple join operations in a FROM clause
@@ -71,6 +71,6 @@
 	FROM EMPLOYEE E RIGHT OUTER JOIN	
 	DEPARTMENT RIGHT OUTER JOIN EMPLOYEE M 
         ON MGRNO = M.EMPNO
-        ON E.WORKDEPT = DEPTNO;</codeblock></example>
+        ON E.WORKDEPT = DEPTNO</codeblock></example>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rreftableexpression.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rreftableexpression.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rreftableexpression.dita (original)
+++ db/derby/docs/trunk/src/ref/rreftableexpression.dita Thu Sep  7 13:28:22 2006
@@ -55,8 +55,7 @@
 }
 </b></codeblock>
 </refsyn>
-<example>
-<codeblock><b><ph>-- SELECT from a Join expression </ph>
+<example><title>Example</title><codeblock><b><ph>-- SELECT from a Join expression </ph>
 SELECT E.EMPNO, E.LASTNAME, M.EMPNO, M.LASTNAME
  FROM EMPLOYEE E LEFT OUTER JOIN
    	DEPARTMENT INNER JOIN EMPLOYEE M 

Modified: db/derby/docs/trunk/src/ref/rreftablesubquery.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rreftablesubquery.dita?view=diff&rev=441209&r1=441208&r2=441209
==============================================================================
--- db/derby/docs/trunk/src/ref/rreftablesubquery.dita (original)
+++ db/derby/docs/trunk/src/ref/rreftablesubquery.dita Thu Sep  7 13:28:22 2006
@@ -41,8 +41,7 @@
 <refsyn><title>Syntax</title>
 <codeblock><b>(<i><xref href="rrefsqlj21571.dita#rrefsqlj21571">Query</xref></i>)</b></codeblock>
 </refsyn>
-<example>
-<codeblock><b><ph>-- a subquery used as a TableExpression in a FROM clause</ph>
+<example><title>Example</title><codeblock><b><ph>-- a subquery used as a TableExpression in a FROM clause</ph>
 SELECT VirtualFlightTable.flight_ID
 FROM
     (SELECT flight_ID, orig_airport, dest_airport
@@ -74,5 +73,5 @@
 WHERE COMM &gt; 
 (SELECT AVG(BONUS + 800)
      FROM EMPLOYEE
-     WHERE COMM &lt; 5000);</b></codeblock>
+     WHERE COMM &lt; 5000)</b></codeblock>
 </example></refbody></reference>