SSIS 2008 - Adding lines when using Flat File Destination

  • Hi,

    I am trying to export data from SQL 2008 DB to Flat FIle in the below format. However, not able to achieve it. PLease help.

    ------------------------------------------------------------------------------------

    SHIP TO: XYXYXYXYXY

    SHIP Time: XYXYXYXYX

    ------------------------------------------------------------------------------------

    Qty Product Code Size Description

    ------------------------------------------------------------------------------------

    1 XYD 24 Pack XYXYXYXYX

    2 XHX 750ml btl XKFIWEJNFD

    3 KFI 250ml btl KURHDEH

    -----------------------------------------------------------------------------------

    Regards,

    Suresh

    Regards,
    Suresh Arumugam

  • GUYS, Please help me to get my above request solved.

    Thanks in advance,

    Regards,

    Suresh

    Regards,
    Suresh Arumugam

  • *edit* - I realise this is in the SSIS forum, my response didn't take that into account so deleted.

  • The first lines need to be added through a script task.

    After that, use a dataflow with flat file destination to append the data to the existing flat file.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks Koen. That's a good point. I will try to add the top portion through script and use the Flat File destination option

    to add the below Item details.

    By the way., is there a way to append data in the existing Flat file when using Flat file destination?

    Regards,

    Suresh

    Regards,
    Suresh Arumugam

  • In the Flat File Destination, you have a checkbox for "Overwrite data in the file". I assume if you leave this blank data will be appended.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • ok. I wil test that option.

    Thanks for your time Koen.

    Regards,

    Suresh

    Regards,
    Suresh Arumugam

Viewing 7 posts - 1 through 6 (of 6 total)

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