SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS 2005 Creating filenames from a SQL Task


SSIS 2005 Creating filenames from a SQL Task

Author
Message
ianhenderson
ianhenderson
Valued Member
Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)

Group: General Forum Members
Points: 51 Visits: 34
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
lshanahan
lshanahan
SSChasing Mays
SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)SSChasing Mays (620 reputation)

Group: General Forum Members
Points: 620 Visits: 436
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.
ianhenderson
ianhenderson
Valued Member
Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)

Group: General Forum Members
Points: 51 Visits: 34
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search