if file('tmaster.csv') new file().delete('tmaster.csv') endif if file('tmaster.dbf') drop table tmaster endif create table tmaster (; id numeric(11), ; part_no char(10), ; title char(35), ; qty numeric(6,0), ; sell numeric(7), ; grade char(16), ; mfg char(35), ; cuml numeric(5,0), ; sdate date, ; asell numeric(7), ; au_desc char(254)) use tmaster append from master for asell # 0 and title # null and part_no < "AF00760X" go bottom msgbox( "Count is " +id+ ". The master.csv file must be ftped to the correct directory before importing into mysql." ) copy to tmaster.csv delim use cFileIn ='tmaster.csv' cFileOut = 'tempworkfile.txt' fIn = new file() fIn.open(cFileIn) fOut = new file() fOut.create(cFileOut) do while not fIn.eof() cRead = fIn.gets() If not chr(26)$cRead fOut.Puts(cRead) endif enddo fIn.close() fOut.close() new file().delete(cFileIn) new file().rename(cFileOut,cFileIn)