Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

problem with excel source Expand / Collapse
Author
Message
Posted Monday, February 9, 2009 11:19 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, April 16, 2009 6:05 AM
Points: 39, 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
Post #653058
Posted Tuesday, February 10, 2009 7:30 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, July 10, 2014 8:41 AM
Points: 1,042, Visits: 2,714
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, SQL Server MVP
Independent Business Intelligence Consultant
www.TimMitchell.net
@Tim_Mitchell

Post #653697
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse