db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-6316) Small typos in devguide examples
Date Mon, 26 Aug 2013 15:09:53 GMT
Knut Anders Hatlen created DERBY-6316:

             Summary: 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:
            Reporter: Knut Anders Hatlen
            Priority: Trivial

I came across two examples with small typos in the developer's guide.


try {
} 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.


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

View raw message