create table newtable (Firstname c(20), LastName c(20), Phone c(20)) * 20 length is not important - could be changed later or here handle = fopen("olddata.ext") =fgets(handle) && Discard first line do while !feof(handle) lcLine = trim(fgets(handle)) m.FirstName = substr(lcLine, rat(" ",lcLine)+1) lcLine = trim(fgets(handle)) m.LastName = substr(lcLine, rat(" ",lcLine)+1) lcLine = trim(fgets(handle)) m.Phone = substr(lcLine, rat(" ",lcLine)+1) insert into newtable from memvar enddo =fclose(handle)Alternative way:
create table newtable (Firstname c(20), LastName c(20), Phone c(20))create cursor myTransfer (Fname c(12), cData c(20)) append from olddata.ext type sdf go top skip scan while !eof() for ix = 1 to 3 store cData to ("m."+fname) skip endfor insert into newtable from memvar skip -1 && Endscan does an implicit skip endscanCetin