OK. Personally I would use a Script Component as a destination and go against
a File connection manager to do the writing. This is the only way I can
> Actually, no that's not exactly right, if I'm understanding you
> correctly. In your example. I would have 3 files and would combine
> them into 1 file. However, all of the records from the first file
> would be together, followed by the records from the second file and
> finally followed by the records in the third file.
>
> What I need to do is slightly different. Data I'm working with has to
> be arranged in such a way that the 3 record layouts are mixed up in
> header/detail format. I tried to explain this in my first note but
> must not be doing a good job.
>
> My output file needs to look like the following example:
>
> Batch Record
> Header Record 1
> Detail Record 1
> Detail Record 2
> Detail Record 3
> Header Record 2
> Detail Record 4
> Detail Record 5
> Batch End Record
> Hopefully that makes sense.
>
> "Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
> news:b067a6252a948c95afb2f2a8ff8@news.microsoft.com...
>
>> Hello Woodberg,
>>
>> COPY 1 + 2 + 3 4.txt will look like this in 4.txt
>>
>> 1
>> 2
>> 3
>> Is that what you require?
>>
>> --
>>
>> Allan Mitchell
>>
http://wiki.sqlis.com |
http://www.sqlis.com |
http://www.sqldts.com >> |
>>
http://www.konesans.com >>> Thanks for the reply. One question though, with the COPY statement,
>>> can you intersperse the different files into the final output file.
>>> I can't just merge the different files one after another, I've got
>>> to keep the different parts together. Is there a way to do that
>>> with the COPY command?
>>>
>>> "Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
>>> news:b067a625267f8c95984ffbc9e89@news.microsoft.com...
>>>
>>>> Hello Woodberg,
>>>>
>>>> Throw the different parts of the process to different files and
>>>> then use the COPY statement on the command line (Execute Process
>>>> task) to bring them together in one file. Make sure you specify
>>>> the output files in the right order when you join them back
>>>> together again.
>>>>
>>>> --
>>>>
>>>> Allan Mitchell
>>>>
http://wiki.sqlis.com |
http://www.sqlis.com |
>>>>
http://www.sqldts.com >>>> |
>>>>
http://www.konesans.com >>>>> I've got a project to export data from a SQL Server and get it
>>>>> into a text file which has multiple records. Basically, the
>>>>> output file has a 3 records; a file record, a header record and a
>>>>> detail record. It has to be configured like below:
>>>>>
>>>>> File Record
>>>>> Header 1
>>>>> Detail 1
>>>>> Detail 2
>>>>> Detail 3
>>>>> Header 2
>>>>> Detail 1
>>>>> Detail 2
>>>>> Header 3
>>>>> Detail 1
>>>>> etc.
>>>>> What is the best technique for doing something like this. I
>>>>> wanted
>>>>> to use DTS to help automate the process.