I have to do this task in SSIS, I will try to convert the same format with adventure works
Read data from SQL server (SELECT * FROM Person.Address)
Now, I want to split the data based on City and create a excel file for each city and place in the city folder(both folder and file will be created dynamically)
I just want your help in deciding the task and approach I should choose to accomplish it.
Easy way, If you have a fixed (and small) number of cities:
1) Read it with a
OLE DB Source2) Add a Multicast
3) For each city add a conditional Split and filter by city. Drag a green arrow from the multicast to the conditional split
4) Add an excel destination for each city and drags the green arrow from the conditional split to the excel destination.
If you have several cities, you will need to “select distinct city”, load this result into a for each loop container (on the control flow), load the city into a variable and in the data flow you do the same than before based on this variable (but just once of course)