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

Create table as Select cannot copy Decimal columns

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 10.13.1.1
    • 10.14.1.0
    • JDBC, SQL
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment