[
https://issues.apache.org/jira/browse/DERBY-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773693#action_12773693
]
Knut Anders Hatlen commented on DERBY-4433:
-------------------------------------------
Thanks Dag! Unfortunately, there were two failures in suites.All.
1) GeneratedColumnsTest:
> create table t_insert_3( a int, b int generated always as ( -a ) );
> insert into t_insert_3 values ( 2, default ), ( 3, default ), ( 4, default )
---> SQLSyntaxErrorException: You may not override the value of generated
column 'B'.
2) LangScripts, union.sql:
> create table insert_test (i int, s smallint, d double precision, r real,
> c10 char(10), c30 char(30), vc10 varchar(10), vc30 varchar(30));
> insert into insert_test (s, i) values (2, 1) union values (4, 3);
---> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> Cannot insert from EXCEPT/INTERSECT when target table has more columns than
> the source
> --------------------------------------------------------------------------------------
>
> Key: DERBY-4433
> URL: https://issues.apache.org/jira/browse/DERBY-4433
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.6.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Attachments: prn.diff
>
>
> If an INSERT statement takes the rows to insert from an EXCEPT query or an
> INTERSECT query, the statement fails with "Column position 'X' out of range"
> if the target table contains more columns than the result returned from
> EXCEPT or INTERSECT.
> Example:
> ij> create table t (x int, y int);
> 0 rows inserted/updated/deleted
> ij> insert into t(x) select x from t except select x from t;
> ERROR 42X77: Column position '2' is out of range for the query expression.
> ij> insert into t(x) select x from t intersect select x from t;
> ERROR 42X77: Column position '2' is out of range for the query expression.
> The corresponding UNION query works:
> ij> insert into t(x) select x from t union select x from t;
> 0 rows inserted/updated/deleted
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.