I try to update a table using another table. I get the error number 407. It says that i try to insert a null in a notnullable column.
I checked the column it my_TIMESTAMP column. Normally it can not be null. Because I update the colum,n with current timestamp. It should generate a timestamp. Where is the problem?
UPDATE table1 mytable
SET (
my_PROCESS,
my_TIMESTAMP,
col3,
COL5
) = (
SELECT
(select PROCESSNAME from table3),
current timestamp,
COL3,
COL5
FROM table2 mytable2
WHERE mytable.COL4 = mytable2.COL4
)
WHERE EXISTS (
SELECT 'x'
FROM table1 mytable1, table2 mytable21
WHERE mytable1.COL4 = mytable21.COL4
);
I replace the
where existscondition withwhere ... INchanged the where condition.