SQL Server Performance

SSIS - For Each Loop Container

Discussion in 'SQL Server 2008 Integration Services' started by Swaroop_d, Aug 7, 2009.

  1. Swaroop_d New Member

    Hello All,
    I am using SSIS For Each File Enumerator in For Each Loop Container.
    I have created a folder and I have 60 text files into that folder which I want to integrate into one SQL server 2008 table.
    I can do so with ForEach Loop container.
    Now, at the end of the month I will have more 30 files into the folder which I will require to add to the same table.
    While doing so, I do not want the previous 60 files to get integrated again.
    Only the new files should get integrated into the table.
    How can I achieve this? Where will I need to specify the condition to take the newer files only?
    My datafile names are according to the date: dt7_08072009, dt7_08082009,dt_708092009 etc.
    Thanks,
    SWAROOP
  2. preethi Member

    Why don't you move the processed files to an archive folder?
  3. Swaroop_d New Member

    Could you please tell me how to do it?
  4. preethi Member

    Hi,
    You already have a FOR EACH container where you go through each file and do the processing.
    Can't you add another FOR EACH container after the above container and go through each file and move to another folder.
    If you already have already processed files you may have to manually move them (only once)
    Hope this helps.

Share This Page