[
https://issues.apache.org/jira/browse/DERBY-6316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kim Haase updated DERBY-6316:
-----------------------------
Attachment: DERBY-6316.zip
DERBY-6316.stat
DERBY-6316.diff
Thanks for catching these, Knut -- even minor corrections are worth making.
In the first topic, the braces are also used rather eccentrically (and
inconsistently).
About the second topic -- we have examples with and without semicolons, but
more commonly with, I think (see the examples for the CREATE TRIGGER statement
at http://db.apache.org/derby/docs/10.10/ref/rrefsqlj43125.html). We usually
put SQL examples in bold, too.
Also there is a reference to a nonexistent topic -- there's no mention of the
term "TriggerAction" in the Reference Manual at all. I think the reference must
be to the "Triggered-SQL-statement" section of the "CREATE TRIGGER statement"
topic.
Anyhow, I'm attaching DERBY-6316.diff, DERBY-6316.stat, and DERBY-6316.zip,
with changes to these topics:
M src/devguide/cdevspecial53165.dita
M src/devguide/cdevspecial41728.dita
I hope I got the parentheses right! Please let me know if further fixes are
needed.
> Small typos in devguide examples
> --------------------------------
>
> Key: DERBY-6316
> URL: https://issues.apache.org/jira/browse/DERBY-6316
> Project: Derby
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 10.10.1.1
> Reporter: Knut Anders Hatlen
> Assignee: Kim Haase
> Priority: Trivial
> Attachments: DERBY-6316.diff, DERBY-6316.stat, DERBY-6316.zip
>
>
> I came across two examples with small typos in the developer's guide.
> http://db.apache.org/derby/docs/10.10/devguide/cdevspecial41728.html:
> try {
> preparedStatement.execute();
> } catch (SQLException se ) {
> String SQLState = se.getSQLState();
> if ( SQLState.equals( "23505" ) )
> { correctDuplicateKey(); }
> else if ( SQLState.equals( "22003" ) ) {
> correctArithmeticOverflow(); }
> else { throw se; }
> }
> Here, the first line in the catch block is not at the same indentation level
> as the other statements in the block.
> http://db.apache.org/derby/docs/10.10/devguide/cdevspecial53165.html:
> CREATE TRIGGER . . .
> DELETE FROM flightavailability
> WHERE flight_id IN (SELECT flight_id FROM flightavailability
> WHERE YEAR(flight_date) < 2005);)
> This example has an unmatched closing parenthesis. And even if it were
> matched, it should have come before the semicolon.
> (By the way, should the semicolon be kept or removed? Derby's SQL dialect
> doesn't accept statements that end with a semicolon, but ij does.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira