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

Create table as Select cannot copy Decimal columns

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.13.1.1
    • Fix Version/s: 10.14.1.0
    • Component/s: JDBC, SQL
    • Labels:
    • Environment:
      Windows 7, DataGrip

      Description

      I create a test table with the following query:

      CREATE TABLE "DERBYTEST" ("STRINGCOLUMN" varchar(255), "INTEGERCOLUMN" integer, "SHORTCOLUMN" varchar(255), "LONGCOLUMN" bigint, "DOUBLECOLUMN" double, "FLOATCOLUMN" double, "DECIMALCOLUMN" decimal(31, 6), "BOOLEANCOLUMN" smallint, "DATECOLUMN" timestamp, "DATETIMECOLUMN" timestamp, "ID" integer, "LASTMODTIME" timestamp, PRIMARY KEY ("ID"))

      this query completes successfully

      I later try to copy the table with the following query:

      CREATE TABLE "DERBYTEST_TEMP" AS SELECT * FROM DERBYTEST WITH NO DATA

      This throws the following exception:

      [42X71][30000] Invalid data type 'DECIMAL(31, 6)' for column 'DECIMALCOLUMN'

      Everything works perfectly fine if I remove the decimal column.

        Attachments

        1. derby-6956-01-aa-removeSpuriousCheck.diff
          0.7 kB
          Rick Hillegas
        2. withTest.diff
          4 kB
          Bryan Pendleton

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              MuratC Murat Cengiz
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: