All Products
Search
Document Center

"Duplicate column name 'XXXXX" is prompted when a data change Task is executed in the DMS console

Last Updated: Feb 08, 2021

Issue

  • When you execute a DDL statement to add a field in the new version of the DMS console, the following error message is displayed.
    Duplicate column name 'XXXXX'
  • When you execute DML statements in the DMS console of the new version and a normal data change ticket is used to replicate data, the SQL statements are as follows.
    insert into table_name(gmt_create,gmt_modified,....) select now(),now(),... from XXX;
    The following error message appears in the PreCheck phase:
    Duplicate column name 'XXXXX'

Cause

  • DDL statement:
    The table that you want to change already contains the fields to be added in the DDL statement.
  • DML statements:
    You cannot use the same fields in the source table to copy data to the destination table.

Solutions

DDL statements

Verify whether the SQL statement and the table schema to be changed have the same fields. You must adjust the SQL statement or the existing fields in the table before execution.

DML statements

  • Change a field by adding its alias:
    You can refer to the following SQL statements to add aliases to the same fields through as.
    insert into table_name(gmt_create,gmt_modified,....) select now() as gmt_create , now() as gmt_modified, ... from XX
  • Skip the line check to make changes:
    1. On the PreCheck page, click skip on the right.
    2. Enter a reason why you want to skip the step of checking the number of scanned rows, and then click OK.
    3. Then you can perform common data change ticket operations such as submitting for approval and executing changes.
      note: If you skip the verification step and execute the change, you are not allowed to back up data. In this case, you must cancel data backup.

Applicable scope

  • Data Management (DMS)