Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2053

Dev Guide: Syntax errors in SQL tips -> Tricks of the VALUES clause -> Multiple rows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.1.3.1, 10.2.1.6, 10.3.1.4
    • 10.3.1.4
    • Documentation
    • None
    • N/A
    • Normal

    Description

      In the "Derby Developer's Guide" manual, there is a page entitled "Multiple rows", under section "SQL tips" and subsection "Tricks of the VALUES clause", see

      http://db.apache.org/derby/docs/dev/devguide/cdevtricks807337.html

      for the current alpha/trunk version.

      This page contains an SQL/IJ example with syntax errors:

      – send 5 rows at a time:
      PREPARE p1 AS 'INSERT INTO ThreeColumnTable VALUES
      (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?)
      EXECUTE p1 USING 'VALUES (''1st'',1,1,''2nd'',2,2''3rd'',
      3,3,''4th'',4,4,''5th'',5,5)'

      Errors are:

      • The PREPARE command will fail because of a missing end quote (').
      • The EXECUTE command will fail because of a missing comma, between ,2,2 and "3rd".
      • Since this is an IJ example (although that may not be immediately clear to all readers; "ij> " should be added in front of each command), both commands lack a semicolon ( at the end.

      Attachments

        1. d2053_v1.diff
          0.9 kB
          John Embretsen
        2. cdevtricks807337.html
          4 kB
          John Embretsen

        Activity

          People

            johnemb John Embretsen
            johnemb John Embretsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: