delimited text file to sql
Posted on 2003-11-03
I have a delimited text file and I'm putting it into sql.
the problem is that the text file is quite large and changes all the time. I am building a C# service that will read the textfile and put all new records into the DB. That works fine for the first time when I initially populate but my problem is keeping it light. I need to compare via date what resides in the db and what resides in the textfile as to avoid duplicate records. Is there an efficient way to take the 2 datatable's (one from sql and one from the text file) and do a compare and put the difference of the results into a 3rd datatable which will be for a bulk insert via dataAccessApplicationBlock.........