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)
 SSIS Read Excel rows and create new output

Author  Topic 

scabral7
Yak Posting Veteran

57 Posts

Posted - 2013-02-01 : 13:22:06
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

52326 Posts

Posted - 2013-02-02 : 01:43:21
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
   

- Advertisement -