You cannot use ">" or "BETWEEN" with rownum. However, I would have hoped it would do something a little more graceful than hanging!
If you're sure you really want to use rownum as your search criteria, you could try
insert into migrate.apc_call_details
select * from migrate.apc_call_details_07
where rownum < to_row_num
MINUS
select * from migrate.apc_call_details_07
where rownum < from_row_num;
However, be advised that since this is actually doing two queries plus a sort (due to the MINUS operation), (a) it may take a while to run, depending on the size of your table and (b) the order that rows are returned may differ between queries (hence the questioning of this technique) and you may get anomalous results.
Bookmarks