INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Need to Repeat Header in rows 1 thru 3

Need to Repeat Header in rows 1 thru 3

(OP)
I have a finished SSIS package in Visual Studio 2008R2 that runs beautifully:
1. exports SQL data into a flat file destination with 1 header row,
2. renames the file to include the date in file name
3. Finally, it FTPs this file to our vendors destination for upload

PROBLEM: recipient wants the header row to be repeated 3 times before details begin. Is there a way to do this??

Tab delimited flat file should look like this:

HeaderRow1 header2 header3 header4 header5 header6
HeaderRow2 header2 header3 header4 header5 header6
HeaderRow3 header2 header3 header4 header5 header6
DetailRow1 Detail2 Detail3 Detail4 Detail5 Detail6
(all other detail records follow)


Thank you in advance for all your help on this.



Kathy,
Bus Sys Analyst

"I am always doing that which I can not do, in order that I may learn how to do it."– Pablo Picasso
The person who says it can't be done shouldn't interrupt the person who is doing it.—Chinese Proverb

RE: Need to Repeat Header in rows 1 thru 3

I would really get the recipient to take it as supplied - no reason ever to have 3 headers like that.

but you can do as follows.

define the file destination without headers.

have a base file with the 3 headers you require (this could be created on the fly by another task)
before the dataflow that uses the file execute a filesystem process (other options exist) and copy the base file to the work file of the dataflow

on data flow destination file untick override data

when the dataflow runs it will add the records to the file with 3 headers and give you what you need.

Depending on the file size you could also have a a step before the renaming of the file which would do as follows.
copy "base file with headers" + "extract file" "destination file"
Not feasible on significantly big files due to extra time to copy the file and space required.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
www.syssoft-int.com

FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close