Why am I getting a "File is not open" error? The following code inserts 1 record into the dave_test table but when it hits the endscan command, it gives me the error. I am trying to get it to loop through cursor4???
Thanks!
Thanks!
Code:
use next_nbr in 2
use dave_test1 in 3
select * from cursor4
scan
SELECT ctr_id from next_nbr
m.ctr_id = next_nbr.ctr_id
REPLACE next_nbr.ctr_id WITH next_nbr.ctr_id + 1
insert into dave_test1(name, dctr_id) ;
values (cursor4.name, m.ctr_id)
endscan