Quote:
Originally Posted by phil72
insert into table_history (
select * from old table (
delete from table_main where carton_no= '100'
)
)
gives error SQL20165N. Both tables have same structure. I am trying move data from table_main to table_history
insert into table_history
select * table_main where carton_no= '100';
delete from table_main where carton_no= '100';
works fine
Any suggestions . Ver DB2 v9.5
Thanks in advance
|
do it in two different queries:
Insert into table_history select * table_main where carton_no= '100';
delete from table_main where carton_no= '100';