Solved

SSIS Package

Posted on 2011-03-01
2
433 Views
Last Modified: 2012-05-11
Hi,

I am new to using SSIS and i am tasked with creating a flat file that includes a header, detail and footer.

I have a SQL Stored proc that i am using and a SSIS package that i have started to read the stored proc and output a flat file.
I need help mostly on the formatting portion in the stored proc and the data flow/derived columns section.

Does someone know of an existing tutorial that helps when creating space/fixed width delimeted files in SSIS?

Attached is a sample file what the flat file should look like.
FLATFILESAMPLE.TXT
0
Comment
Question by:MoreThanDoubled
2 Comments
 
LVL 16

Accepted Solution

by:
EvilPostIt earned 250 total points
ID: 35015399
Hi,

Does this help?

http://ctrlshiftb.wordpress.com/2009/11/27/using-ssis-to-export-a-fixed-width-flat-file/

As you need a header, body and footer. You would do this by having three seperate point at which it was sent out to the files. You just need to ensure the body & footer section are set to append rather than overwrite.
0
 
LVL 37

Assisted Solution

by:ValentinoV
ValentinoV earned 250 total points
ID: 35015641
It should be possible using the Script component as a destination.  Have a look at the following: http://msdn.microsoft.com/en-us/library/ms135939%28v=SQL.100%29.aspx

There's an example at the bottom on how to create a flat file destination.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question