SkipRow error on intended 'skipped' transformation -
06-22-2006
, 06:36 PM
I'm using Sql 2000, and I have a fairly simple problem that I can only
solve with a 'holding' table.
I want to skip inserting a row AND NOT process any further
transformations if the very first column in the row evaluates to 'F',
which is a Footer record.
I use the following:
If DTSSource("Col001") = "F" Then
Main = DTSTransformStat_SkipRow
Else
DTSDestination("LineType") = DTSSource("Col001")
Main = DTSTransformStat_OK
End If
End Function
This tests ok, and it looks ok in 'view results', however, I get an
error way down on column 20 within the same row, where a blank column
in the input file is trying to be copied into the money column of my
table.
Why is this Copy on column 20 even being executed when Row 1 has
already correctly been evaluated as the Footer, and therefore further
transformations have been skipped? Does it only skip transformations
that have ActiveX scripts or FormatDateTime, therefore the simple Copy
transformation gets attempted? Maybe the copy isn't considered a
'transformation' in the first place?
This isn't a huge problem, I've just seen this asked many different
ways, and I wanted to clarify for me and everyone else. One thing I
have become aware of, is that just because a record is skipped in terms
of the insert in the database's table, it doesn't mean that the
subsequent transformations are not attempted, this behaviour can
actually be quite useful, just as truly ignoring all remaining
transformations for that record wold be useful for me in this
situation.
Thanks |