Solved

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

Posted on 2009-07-15
2
714 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
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS SQL with ODBC 5 36
SQL Server 2012 r2 - Sum totals 2 25
SQL Server - Set Field Values ito Zero Based on Related Table 4 27
Passing Parameter to Stored Procedure 4 24
In this article I will describe the Copy Database Wizard 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 article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

777 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