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)
 Create control file

Author  Topic 

ugh3012
Yak Posting Veteran

62 Posts

Posted - 2013-07-11 : 08:12:09
I have a task that requires me to extract information from tables and put them in to a text file. Then I have to create a text file that has few lines of codes including numbers of rows that was extracted. Any suggestions on how I can do this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-11 : 11:57:18
Use data flow task with OLEDB source and flat file destination for first part.
For second part add a multicast transform to source in data flow task and connect new output to rowcount transform. Create a variable to hold count value inside rowcount transform.
Then use a execute sql task using OPENROWSET to write details to file

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

ugh3012
Yak Posting Veteran

62 Posts

Posted - 2013-07-11 : 16:21:42
Thank you. As always, you have been a great helpful. Cheers.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-12 : 01:44:14
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -