Solved

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

Posted on 2009-07-15
2
709 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
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
Comment Utility
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
Comment Utility
Improvements?!!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now