problem with excel source

  • Hi SSIS gurus,

    i have one excel source.it has 5 rows.my requirement is i have to skip frist 2 rows and load remaing 3 rows into destination.

    for example:

    excel source

    -----------

    Eno,Ename,Sal

    1,James,10000

    2,harrish,20000

    3,Nash,30000

    4,Peter,40000

    5,Don,50000

    i have to skip 1st and 5th rows and load remaing data into sqlserver destination

    for example:

    sqlserver destination

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

    Eno,Ename,Sal

    2,harrish,20000

    3,Nash,30000

    4,Peter,40000

    how do i have to do in this situation. which transformation i have to take to solve this problem.

    any body help appriciate

    thanks

    murali

  • You can skip n number of rows at the beginning, but there is no transformation that will allow you to skip every nth row. Is there anything in the data of those 1st and 5th rows that you could use to exclude them in the pipeline (for example, using a conditional split)?

    If not, there are a couple of things you can try. You could send the rows to a staging table and use an Execute SQL Task to delete the 1st and 5th rows, then use that staging table as a source in another data flow to send output to the destination table. You could also try, as a last resort, using the Script Task or Script Component for this.

    hth,

    Tim

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

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

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