db2 v9.1更新数据报错

表结构如下:create table cbankinterest(    workdate   varchar(8)       not null,    bankid       varchar(12)     not null,    product    ...显示全部
表结构如下:create table cbankinterest
(
    workdate   varchar(8)       not null,
    bankid       varchar(12)     not null,
    product     decimal(15,2)  default 0.00  not null,
    interrest_rates   decimal(15,2) default 0.000000 not null,
    interest     decimal(15,2)
);
create unique index cbankinterest_idx1 on cbankinterest (workdate,bankid);

执行update cbankinterest set bankid='235013053027' where bankid='133013051003'
DB20134E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command .During SQL processing it returned:
SQL0803N One or more values in the INSER statement ,UPDATE statement ,or
foreign key update caused by a DELETE statement are not valid because the
table "IDDS.CBANKINTEREST" from having duplicate values for the index key.
SQLSTATE=23505
求助此问题如何处理收起
参与4

查看其它 2 个回答vodren的回答

vodrenvodren技术支持信雅达
多谢找到原因了
系统集成 · 2015-09-08
浏览1110

回答者

vodren
技术支持信雅达
擅长领域: 数据库服务器前置系统

vodren 最近回答过的问题

回答状态

  • 发布时间:2015-09-08
  • 关注会员:1 人
  • 回答浏览:1110
  • X社区推广