*!* Structure off source file: *!* Column Description *!* ------ ----------- *!* 1 4 digit number (ie 9999) *!* 2 4 digit number denoting the time (ie. 1235 which is 12.35) *!* 3 8 digit number denoting the date (ie. 11092000) *!* 4 one digit character which holds the flag (ie O = Out , I = In) *!* SourceFile.Txt *!* 4100,0900,11082000,I *!* 4101,1530,11082000,I *!* 4102,1700,11082000,O *!* 4103,2015,11082000,O *!* Need to append a table with the following fields *!* code ,c,10 *!* timein ,c,6 *!* timeout ,c, 6 *!* date ,c, 8 *!* if the flag equals O the data should go to timein *!* if the flag equals I the data should go to timeout #DEFINE __Flag tOut CLEAR ALL CREATE CURSOR Test ; ( cCode C(10), tIn C(6), cReceived C(8), tOut C(6) ) APPEND FROM c:\Temp\HB\SoureFile.Txt DELIMITED UPDATE Test ; SET tOut = IIF( __Flag = "I", "", tIn ) ; , tIn = IIF( ISDIGIT(__Flag), "", tIn ) LOCATE BROWSE LAST NOWAIT RETURN .T.Regards