Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS 2005 Creating filenames from a SQL Task Expand / Collapse
Author
Message
Posted Friday, April 12, 2013 5:38 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, May 3, 2013 9:39 AM
Points: 10, Visits: 20
Good afternoon

I'm in the process of building an SSIS package which will be used to export telephony data on a 15-minute frequency.

The first stage of the process collates all previously-uncollated data, which I'm doing by executing a SQL task. What I then want to be able to do is to export all of that data, creating a separate file for each telephony campaign. Currently I have a table that contains each campaign name, and I want to be able to retrieve the contents of that table using a SQL query and then create a new file for each campaign name. I can't get my head around how to do that.

Can anyone help me?

TIA

Hendo
Post #1441645
Posted Tuesday, April 16, 2013 2:19 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 6:00 AM
Points: 138, Visits: 254
In general I'd look at using a Conditional Split to divide up your collated dataset by campaign. Though I haven't done so myself, there are plenty of articles on the Web about creating dynamic output filenames for Flat File Destinations using SSIS variables. Just google "ssis dynamic output filenames".

That should get you going. But if there's anything I've learned about using SSIS, there's usually more than one way to accomplish a given task.


____________
Just my $0.02 from over here in the cheap seats of the peanut gallery - please adjust for inflation and/or your local currency.
Post #1443007
Posted Wednesday, April 17, 2013 2:21 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, May 3, 2013 9:39 AM
Points: 10, Visits: 20
I agree, there's always more than one way to crack a walnut with SSIS. I'll do some digging and see what I can find out.

One thing though: you said that the Conditional Split is good for flat-file destinations? Does that mean that it isn't so useful for Excel spreadsheet outputs? I'm not sure which format I'm going to be using for output yet and while flat-file might be the best solution in terms of record quantities, I don't want to be limited by the wrong choice of method.

Again, TIA
Post #1443141
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse