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 2008 Forums
 SSIS and Import/Export (2008)
 Fetching count before inserting data into table

Author  Topic 

abhijaiswal.84
Starting Member

29 Posts

Posted - 2012-07-23 : 10:44:39
Hi,

I am having a SSIS package, which pulls the data from .csv file and insert those records into SQL Server table.

Before insering the data I used some business logic (Proc) because of which few record get deleted. e.g. In a csv file I have 20 records and after running the package only 15 records were inserted into SQL Server table and because of the logic I used 5 records get deleted.

Now I want to get the count of the data which are not deleted after running business logic (proc) and these count should be capured before data/records inserted into SQL Table.

Can anyone help me on this so that I can capture the data before it inserted into SQL Server table and after passing the store proc (Business logic) means in intermidiate stage.

Thanks for your help.

Abhishek

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-23 : 12:02:21
assuming you're using data flow task you can make use of multicast task to take copy of input data and then use rowcount transformation to get rowcount and store it in variable. then use execute sql task to populate table with variable value

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -