Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Flat file creation problem

Author  Topic 

murrayb3024
Yak Posting Veteran

79 Posts

Posted - 2009-01-26 : 09:42:02
I have 2 tables (table1 and table2). I need to create a flat file from this data to ftp up to our mainframe. I am trying to create a delimited text file from the tables. Here is where I am having the problem. From table1 I need get generate the first line of the flat file, and the rest of the file comes from table2. The issue is that the first line of the flat file is a different layout then the rest of the file. For ex:

Line 1:
1-9 ID
10-14 blank
15-20 Code

Line 2 - ...:
1-9 ID
10-25 Description
26-30 Amount

I hope this makes sense.

So my question is, is there a way to create a flat file with the above example using my SSIS package?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-26 : 10:15:33
i think you need to use bcp with format file for this
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-01-30 : 16:02:20
It can be done. Download the Table1 data into the FlatFile.(Do not check the 'Overwrite Data in file' option).
Then as a sequential task, download table2 data into the same file. It will get appended to the already existing table1 data.
Go to Top of Page
   

- Advertisement -