SELECT InputFiles && Contains a list of files to process SCAN =SQLEXEC([SELECT * FROM MyRemoteView],MyView) && SQL Server 2K * MyRemoteView Contains MAX(Timestamp) down to milliseconds * for all unique records´from it's base table * Boy I hope I've explained this properly * Anyway, that's why I keep calling the SQLEXEC for every TABLEUPDATE() INDEX ON ...TAG MyTag... CREATE Cursor MyCursor ... lcFilename=InputFiles.FileName APPEND FROM lcFileName SCAN SCATTER MEMVAR IF SEEK(MyExpression,MyView,...); AND MyCursor.Timestamp>MyView.Timestamp * Compare timestamps to make sure the same stuff does * not get added twice REPLACE MyView.Timestamp WITH MyCursor.Timestamp REPLACE some values in MyView with some other values ELSE INSERT INTO MyView FROM MEMVAR ENDIF * Increment the number of observations with 1 REPLACE MyView.NumerOfObs WITH MyView.NumerOfObs+1 ENDSCAN * We have now processed 1 inputfile, update MyView llResult=TABLEUPDATE(2,.T.,"MyView",Errors) * Check if the update returns .T. and handle any records * that did not make it through... SELECT InputFiles ENDSCANNow what happens, in all cases so far, TABLEUPDATE returns .T.