May 27, 2002 at 1:27 pm
Hi everbody.
I created a DTS package to copy data from AS400 to SQL Server.
But from the AS400 file I would like to copy only the rows in which a specific field (in my case field: "COPY") has the value 1. So I changed the DTS script as follow:
Function Main()
if DTSSource("BREAKLVL") = "1" then 'if the value is equal to 1 then copy
DTSDestination("Copy") = DTSSource("COPY")
DTSDestination("OVERFLOW") = DTSSource("OVERFLOW")
DTSDestination("Fiscal_Period") = DTSSource("I2ARCD")
DTSDestination("Week_Number") = DTSSource("I2")
end if
Main = DTSTransformStat_OK
End Function
And is not working! Could anybody give me the right direction.
Thank you,
Durug
May 27, 2002 at 2:10 pm
I found the solution:
Function Main()
if DTSSource("COPY") <> "1" then
Main = DTSTransformStat_SkipInsert
else
DTSDestination("Copy") = DTSSource("COPY")
DTSDestination("OVERFLOW") = DTSSource("OVERFLOW")
DTSDestination("Fiscal_Period") = DTSSource("I2ARCD")
Main = DTSTransformStat_OK
end if
End Function
Thanks anyway,
Durug
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy