Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-07-15
2
Medium Priority
?
726 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 2000 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

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
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.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

610 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