gi*******************@yahoo.com wrote:
insert into new_table (r_name,r_id) values (
select z.r_name,b.r_id from
(select r_name from z.r_lookup where r_id=821 ) z
right outer join values
(select nextval for r_id_seq from sysibm.sysdummy1) as b(r_id)
)
INSERT INTO news_table(r_name,r_id)
SELECT r_name, next value for r_id_seq from z.r_lookup where r_id=821
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab