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)
 Total no of row count

Author  Topic 

lols
Posting Yak Master

174 Posts

Posted - 2007-09-25 : 02:10:11
Hi,



I am using a foreach file to loop through mdb files kept in a folder and then transfer them to Sql server.

I want to do the following -



Sum the total no. of rows in mdb while the package executes

Sum the total no of rows transferred to Sql server.

Write them to a database (InitialRowCnt, FinalRowCnt, PackageNm, UserNm)



Note: Total = Total rows in all mdb files. so if there are 10 mdb files with 10 rows each, total = 100.


I saw a RowCount transformation..but just dont know where to place and what to do with it.



thanks

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2007-09-27 : 11:25:46
You should place the Row Count component between the source and the destination on your data flow, you need to create an integer variable that your component will have access to (see scopes) and specify that variable on your Row Count component, the Row Count component will store the number of rows passed through that flow and write to the variable you specify.

The links below should help you or google "Row Count (SSIS)"
http://blogs.conchango.com/jamiethomson/archive/2007/02/28/SSIS-Nugget_3A00_-Output-the-rowcount.aspx
http://msdn2.microsoft.com/en-us/library/ms141136.aspx
Go to Top of Page

lols
Posting Yak Master

174 Posts

Posted - 2007-10-01 : 07:54:00
thank you. Worked!!
Go to Top of Page
   

- Advertisement -