if...else question -
08-20-2003
, 05:29 PM
sql2k sp3
Im trying to import data from a .txt file into a sql
table. In Active X, if Col001 in the file = "1" then it
should be inserted into a certain table. If not it should
be skipped.
if DTSSource("Col001") = "1" then
DTSDestination("au_id") = DTSSource("Col002")
DTSDestination("au_lname") = DTSSource("Col003")
DTSDestination("au_fname") = DTSSource("Col004")
DTSDestination("phone") = DTSSource("Col005")
DTSDestination("address") = DTSSource("Col006")
DTSDestination("city") = DTSSource("Col007")
DTSDestination("state") = DTSSource("Col008")
DTSDestination("zip") = DTSSource("Col009")
DTSDestination("contract") = DTSSource("Col010")
Main = DTSTransformStat_OK
else
DTSTransformStat_SkipRow
end if
End Function
I try to run this and it highlights the (if DTSSource
("Col001") = "1" then) in yellow and fails. Any ideas why
would be appreciated.
Thanks, Chris. |