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

ERROR 42ZA2 creating table with check constraint with literal comparison

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.4.1.3
    • 10.3.1.4, 10.4.1.3
    • SQL
    • None

    Description

      I cannot create the following table with a collated database.
      EMPNAME should be TERRITORY_BASED collation I think, but perhaps is not initialized in time for the check constraint processing.

      ij> connect 'jdbc:derby:nordb;create=true;territory=no_NO;collation=TERRITORY_BASED';
      ij> CREATE TABLE STAFF9 (EMPNUM CHAR(3) NOT NULL
      CONSTRAINT STAFF9_PK PRIMARY KEY,
      EMPNAME CHAR(20),
      GRADE DECIMAL(4),
      CITY CHAR(15),
      CONSTRAINT STAFF9_EMPNAME CHECK (EMPNAME NOT LIKE 'T%'));
      ERROR 42ZA2: Operand of LIKE predicate with type CHAR(20) and collation UCS_BASIC is not compatable with LIKE pattern op
      erand with type CHAR(2) and collation TERRITORY_BASED.

      Attachments

        Issue Links

          Activity

            People

              mamtas Mamta A. Satoor
              kmarsden Katherine Marsden
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: