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

Appending the results of multiple stored procedures into a text file using SSIS Expand / Collapse
Author
Message
Posted Monday, March 25, 2013 11:59 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 5:22 PM
Points: 58, Visits: 197
Hello everyone.

I have a requirement where I need to get the output resultant set of various stored procedures and
get them out into a single text file.

I currently used a data flow task with the stored procedure as the source and a text file as the destination.

I would like to know

1) how I can do the same for the remaining stored procedures, sending the results out and appending to
the same text file.

2) I would also like to know how I can include the column headers in the text file as currently I do not have
the column headers included in the output text file.
Post #1435080
Posted Monday, March 25, 2013 12:02 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:47 AM
Points: 5,047, Visits: 11,795
Are the output columns always the same, or do they vary by proc?


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1435081
Posted Monday, March 25, 2013 12:04 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 5:22 PM
Points: 58, Visits: 197
Hi Phil,

The output columns are actually different.
They vary by proc.

Thank you !
Post #1435082
Posted Monday, March 25, 2013 12:13 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:47 AM
Points: 5,047, Visits: 11,795
Love & Peace (3/25/2013)
Hi Phil,

The output columns are actually different.
They vary by proc.

Thank you !


But you want them all in the same file - presumably, then, with new column headings intermingled with the data at the point where one proc's data finishes and another's starts?

There is no nice way of doing this. Personally, I'd set up five dataflows which write to five separate text files and then have an Execute Process task at the end which does a copy/append of the five text files to a single, new, file.

I don't have SSIS in front of me and cannot remember the answer to your question about column headings - hopefully someone else will chime in.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1435085
Posted Tuesday, March 26, 2013 7:08 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 5:22 PM
Points: 58, Visits: 197
Hi Phil,

Thank you for giving me direction.
I figured out the answer for the second part of the question.
Post #1435459
Posted Tuesday, March 26, 2013 7:12 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:47 AM
Points: 5,047, Visits: 11,795
Love & Peace (3/26/2013)
Hi Phil,

Thank you for giving me direction.
I figured out the answer for the second part of the question.


Excellent - so everything developed, tested and implemented now?

Or do you have any further questions?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1435461
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse