dynamobi/dynamobi — Issue #130: [LDB-192] subqueries in UPDATE don't work
Author: dynamobi-build
Created: 2011-12-30 02:15:39+00:00
State: open
Labels: LDB, Optimizer

[reporter="jvs", created="Fri, 12 Dec 2008 12:33:49 -0500 (GMT-05:00)"]
I implemented UPDATE via rewrite to MERGE, but the rewrite doesn't seem to be compatible with subqueries.

update upemps as u

set empno = empno + (

select count(*)

from upemps

where deptno = u.deptno);

Error: At line 5, column 20: Table 'U' not found (state=,code=0)

update upemps

set name = lower(name),

deptno = -deptno

where deptno in (select min(deptno) from upemps);

Error: java.lang.AssertionError: rex != null (state=,code=0)

update upemps u

set name = (

select name from upemps where empno = u.empno + 1);

Error: At line 3, column 43: Table 'U' not found (state=,code=0)