June 15, 2005 at 4:53 am
I am importing excel sheet data to Sqlserver using DTS.
Is there any way we can skip few rows while import!
Pavas
Dream The Dream
Explore the World
Experince The Exhilaration
June 15, 2005 at 5:32 am
I assume that these rows are in the middle.
Good Hunting!
AJ Ahrens
webmaster@kritter.net
June 15, 2005 at 6:51 am
Where's the rest of the post AJ?
June 15, 2005 at 7:47 am
I had to do this to a file that had three record types. In the first field (DTSSource("Col001")) there were values showing the type of the row. (1, 2, 9)
I created three DTS packages (one for each type) and then performed the following:
if DTSSource("Col001") = "1" then
DTSDestination("SYCO") = DTSSource("Col015")
DTSDestination("SYKCOO") = DTSSource("Col016")
DTSDestination("SYDOCO") = DTSSource("Col017")
DTSDestination("SYDCTO") = DTSSource("Col018")
DTSDestination("SYSFXO") = DTSSource("Col019")
DTSDestination("SYAN8") = DTSSource("Col023")
DTSDestination("SYVINV") = DTSSource("Col024")
Main = DTSTransformStat_OK
else
Main = DTSTransformStat_SkipRow
end if
That should help.
June 16, 2005 at 3:49 am
If you have the condition to skip rows then this should work:
If <<condition>> Then
Main = DTSTransformStat_SkipInsert
Else
DTSDestination("....") = DTSSource("......")
....................
Main = DTSTransformStat_OK
End If
Hope this helps
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply