SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


problem with excel source


problem with excel source

Author
Message
muralikrishna37
muralikrishna37
SSC-Enthusiastic
SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)SSC-Enthusiastic (157 reputation)

Group: General Forum Members
Points: 157 Visits: 99
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
Tim Mitchell
Tim Mitchell
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2239 Visits: 3009
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


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search