Solved

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

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Backup Question 2 29
tools to scan a SQL server's problem 14 26
sql server query 12 25
SQL Availablity Groups Shared Path 2 14
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

856 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