Hello,
I have a small dilemma I need some help with. I would like to insert into a DB2 table the system date (timestamp) along with data retrieved via a db2 select statement but I am unsure how to code it using one statement.
I would like to use the following format to insert to the table but I am unsure how to add the "VALUES (CURRENT TIMESTAMP)"
Format I would like to use.....
Also here is the table stucture,
Thanks in advance
I have a small dilemma I need some help with. I would like to insert into a DB2 table the system date (timestamp) along with data retrieved via a db2 select statement but I am unsure how to code it using one statement.
I would like to use the following format to insert to the table but I am unsure how to add the "VALUES (CURRENT TIMESTAMP)"
Format I would like to use.....
Code:
db2 "INSERT INTO table1 (id, type, records, country) select id, type, count(*), country from tdb.table2 where id = 222 and group by id, type"
Code:
Column Type Type name schema name Length Scale Nulls ------------------------------ --------- ------------------ -------- ----- ------ SYSTEM_DATE SYSIBM TIMESTAMP 10 0 No ID SYSIBM DECIMAL 6 0 Yes TYPE SYSIBM VARCHAR 25 0 Yes RECORDS SYSIBM DECIMAL 8 0 Yes COUNTRY SYSIBM VARCHAR 2 0 Yes
Comment