[
https://issues.apache.org/jira/browse/TRAFODION-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Wayne Birdsall closed TRAFODION-3000.
-------------------------------------------
> MERGE DELETE on table with unique index fails with error 4002
> -------------------------------------------------------------
>
> Key: TRAFODION-3000
> URL: https://issues.apache.org/jira/browse/TRAFODION-3000
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.3
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
> Priority: Major
> Fix For: 2.3
>
>
> The following session illustrates the problem:
> {{>>drop table if exists t1 cascade;}}
> {{--- SQL operation complete.}}
> {{>>}}
> {{>>create table t1 (c1 int not null, c2 int, primary key (c1), unique
> (c2));}}
> {{--- SQL operation complete.}}
> {{>>insert into t1 values (1,1),(2,2),(3,3);}}
> {{--- 3 row(s) inserted.}}
> {{>>}}
> {{>>merge into t1 on c2=1 when matched then delete;}}
> {{*** ERROR[4002] Column "NEW@".C2 is not found. Table "NEW@" not exposed.
> Tables in scope: "OLD@". Default schema: TRAFODION.SEABASE.}}
> {{*** ERROR[8822] The statement was not prepared.}}
> {{>>}}
> If the "unique" constraint is absent in the CREATE TABLE statement, the MERGE
> statement completes successfully.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)