I would like to insert more rows into the table t_str_dag
using the following select command, but I always get this "specifies multiple columns"- Error
even though the select command alone gives me exactly what I want to insert.???
db2 => select id, id/100 *100 from t_structures where id>200 and id <300
ID 2
----------- -----------
220 200
230 200
240 200
3 record(s) selected.
db2 => insert into t_str_dag (str_id, parent_id) values(select id, id/100 *100 from t_structures where id>200 and id <300)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0412N The SELECT clause of a subquery specifies multiple columns.
SQLSTATE=42823
using the following select command, but I always get this "specifies multiple columns"- Error
even though the select command alone gives me exactly what I want to insert.???
db2 => select id, id/100 *100 from t_structures where id>200 and id <300
ID 2
----------- -----------
220 200
230 200
240 200
3 record(s) selected.
db2 => insert into t_str_dag (str_id, parent_id) values(select id, id/100 *100 from t_structures where id>200 and id <300)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0412N The SELECT clause of a subquery specifies multiple columns.
SQLSTATE=42823