Solved

SQL 2005 SSIS Add an unrelated footer line to a text file

Posted on 2009-07-15
2
721 Views
Last Modified: 2013-11-10
I need to add an unreleated footer line to the bottom of a text file I'm already extraciting using a SSIS package.

The extracted file needs to look like this:

1321 | Cushions | CC1234/01| In Stock | £120.00 | Percentage Discount | 50 | etc.
1321 | Cushions | CC1234/01| In Stock | £120.00 | Percentage Discount | 50 | etc.
1321 | Cushions | CC1234/01| In Stock | £120.00 | Percentage Discount | 50 | etc.
1321 | Cushions | CC1234/01| In Stock | £120.00 | Percentage Discount | 50 | etc.
1321 | Cushions | CC1234/01| In Stock | £120.00 | Percentage Discount | 50 | etc.
FTR | ROW COUNT

The footer row has a differnet number of columns and different data type from the rest of the extract. So I can't just populate the first row of the source table. So:

1. How do I ammend the SSIS package to write a custom footer row to the text file after the rest of the data is written?
2. What expression will give me a number of rows in the data extract minus the footer row?
0
Comment
Question by:Christie_M
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
ID: 24862094
Dear User,
I made an example for you.
1. Create a new SSIS Solution or add the attached package to one solution.
2. Update the cmSQL connection and SSIS variable with filepath + filename.

Helped?
Regards,
Pedro
SSIS-Interface.JPG
SSIS-OutputFile.JPG
Package-EE120-dtsx.txt
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24880654
Improvements?!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

724 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