Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SSIS Exception Handling

Author  Topic 

AVemuganti
Starting Member

3 Posts

Posted - 2008-07-23 : 08:34:46
Hi All,

I'm trying to build an SSIS package. The process flow of the package would be:

Step 1:
1.Read the data from table A.
2.Validate if the data in table A exists in table B. If there are any records that contains invalid data in table A, Abort the package, error and email notify to a distribution group.
3.Upon validation, hold for union with the set of records in Step 2.

Step 2:
1.Read the data from a CSV file.
2.Validate each field in file. If there are any invalid records, publish the error records to the same location and filename with "ERROR_" appended to the begining.
3.Upon validation of records, hold for union with Step 1 records.

Step 3:
Union records from Step 1 and Step 2 and write them into a table.

My question is, how do I group only the invalid records and publish to an error file in Step 2.

Any response would be appreciated.

Thanks in advance,
-Amith Vemuganti

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-23 : 09:36:26
you have to use
1)Foreachloop container
2)send error task
3)Execute SQL task.
Go to Top of Page

AVemuganti
Starting Member

3 Posts

Posted - 2008-07-23 : 16:23:41
Thank you. I'll give it a try and see how it works.
Go to Top of Page
   

- Advertisement -