* untested code that should get you started create table TheBook ( iChapter i, mText m ) lcBook = filetostr( "TheBook.xt" ) lnChapter = 0 do while ! empty( lcBook ) lnChapter = lnChapter + 1 i = at( "Chapter ", lcBook, 2 ) if ( i > 0 ) lcChapter = left( lcBook, i-1 ) lcBook = substr( lcBook, i ) else lcChapter = lcBook lcBook = "" endif insert into TheBook values ( lnChapter, lcChapter ) enddo