Hello Everyone,
I have an SSIS package which takes a SQL Query and generates a PIPE (|) delimited flat file. Simple enough. However, I also need to add a Trailer record at the bottom of the file (footer). To make this happen I could either do a UNION ALL on the same query script or what I've done is to create another query with the Trailer record and using the Merge component simply merged and appended the trailer record at the botton of the actual file. The issue, however, is that the trailer record is always including extra PIPES at the end of the trailer. According to business, this wouldn't load properly at our vendor side due to the extra pipes in the trailer record as it'll be seen as additional columns.
Is there anyway to get rid of those extra pipes at the end of the trailer? Please see example below.
Trailer record should look like this:
TRAILER|A|B|C|D|
As of now, the appended Trailer record looks like this (additional pipes for each column in the main query script):
TRAILER|A|B|C|D|||||||||||||||||
Thank you all in advance for your insight.
MirS