Send flat file data to two different tables using SSIS

  • HI,

    I have a flat file with huge number of rows. My data wil lbe in the following format.

    Header row

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Header Row

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Line for the header row.

    Header row is not the row with column names. This is something like I have a school name and address in the header and all the student details in line rows.

    Flat file is a csv file with fixed width style. There is no column separator and also no column that differentiates between header and line date except the number of characters in a row. I have Max 30 chars in header and 200 chars in line.

    I need to send header data to one table and line data to another table and i need to have foreign key constraint.

    Please help me on this.

  • I'd import the data into one staging table, and then do the rest of the work within Sql Server (well, in a stored proc rather than a DataFlow task, at any rate).

    If you split the header and line rows into two other staging tables after the import, I presume you have a way of matching each header record back to each line record?

    ------------------------------------------------------------------------
    Bite-sized fiction (with added teeth) [/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply