SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Create control file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ugh3012
Yak Posting Veteran

62 Posts

Posted - 07/11/2013 :  08:12:09  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 07/11/2013 :  11:57:18  Show Profile  Reply with Quote
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 - 07/11/2013 :  16:21:42  Show Profile  Reply with Quote
Thank you. As always, you have been a great helpful. Cheers.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 07/12/2013 :  01:44:14  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000