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)
 SSIS Read Excel rows and create new output
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scabral7
Yak Posting Veteran

57 Posts

Posted - 02/01/2013 :  13:22:06  Show Profile  Reply with Quote
Hi,

I have an excel file with following data:

Agent State Exposure Insured Name
Rogers Inc MA 100,000 John Smith
SAN Group RI 200,000 Jim Morrison
SAN Group RI 100,000 Jimi Hendrix
123 Agency MA 300,000 Mickey Mouse
Rogers Inc MA 50,000 Mike Greenwell

I want to be able to read the file and create new excel files for each Agent listed.

So for Example, the above file would create 3 separate files since there are 3 different Agents listed. Each Agent file would contain the same information from the original file. The name of the file would be somethign like AgentName.xls

So the SAN group file would have this:

Agent State Exposure Insured Name
Rogers Inc MA 100,000 John Smith
SAN Group RI 200,000 Jim Morrison
SAN Group RI 100,000 Jimi Hendrix

Is there a way to accomplish this in SSIS?

thanks
Scott

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/02/2013 :  01:43:21  Show Profile  Reply with Quote
yep.
Make use of data flow task
it will have an excel source to start with and this reads data from source excel
use conditional transform next and add three outputs based on agentname (Agent="Rogers",Agent="SAN",Agent="123 Agency")

Take each of the outputs and join to excel destination and give name as agentname



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

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.47 seconds. Powered By: Snitz Forums 2000