Darkwing99
Programmer
Hi experts,
I have to fill rows into a database with an insert-statement.
The problem is the primary (unique) key. The column is named TS_INSERT and it should be the TS, when the row was inserted.
But when I write:
DB2 stops with SQL -803 because all "CURRENT TIMESTAMP" are the same.
Is there a workaround for this problem?
Regards,
Thomas
I have to fill rows into a database with an insert-statement.
The problem is the primary (unique) key. The column is named TS_INSERT and it should be the TS, when the row was inserted.
But when I write:
Code:
INSERT INTO table1
SELECT CURRENT TIMESTAMP
, var2
, var3
, var4
FROM table2
WHERE
....
DB2 stops with SQL -803 because all "CURRENT TIMESTAMP" are the same.
Is there a workaround for this problem?
Regards,
Thomas