• Hmm thought it would do a line by line check.. turns out that my thought process was off anyway. Given that we have data here that is not in SAP, I can not do any conditional deletes. I will have to use the update statement to update existing records, instead of deleting and re-loading.

    However if the plan had not changed.. then the delete statement would still not have worked quite right. I still wonder how that would have worked. The idea was to have it select all records that existed and refresh only those... to get the list you would have to run the following SQL statement:

    Select plant.Plant

    from file_Plants as plant

    left outer join Plant_Master as mas

    on mas.Plant_CD = plant.Plant

    where NOT(mas.Plant_CD is NULL)