I have a command table containing:
---********************************---
connect to sample;
drop table emp1;
create table emp1 like employee;
insert into emp1 select * from employee
-- fetch first 5 rows
;
select count(*) from emp1;
connect reset;
---********************************---
This will successfully create table EMP1 with 32 rows in it (the same rows in the distriuted EMPLOYEE table in the SAMPLE d/b). However, by uncommenting the 5th line, I would expect only 5 rows to be inserted.
The "FETCH FIRST nn ROWS" certainly works as a stand-alone Select. Why does it not work when combined with the Insert command ?
---********************************---
connect to sample;
drop table emp1;
create table emp1 like employee;
insert into emp1 select * from employee
-- fetch first 5 rows
;
select count(*) from emp1;
connect reset;
---********************************---
This will successfully create table EMP1 with 32 rows in it (the same rows in the distriuted EMPLOYEE table in the SAMPLE d/b). However, by uncommenting the 5th line, I would expect only 5 rows to be inserted.
The "FETCH FIRST nn ROWS" certainly works as a stand-alone Select. Why does it not work when combined with the Insert command ?