Conditional Transformation if Overflow -
04-28-2005
, 02:37 PM
I'm trying to write a transformation script to write null whenever an
overflow is possible due to invalid date/time string, rather than the
DTS package fail because the data couldn't be imported from the file
into the table.
I'm not sure how to check to see if the cast is possible. The source
field should be in the format:
yyyyMMdd
and the destination field is a datetime field.
The source field could foreseeably contain just about anything.
Ideally I'd like to just write null to the destination if any type of
error could occur in the importing, but I'm not sure if there's an easy
condition to test this with, or if I'd have to just account for all
possible cases individually.
If anyone can provide an example of the check for potential overflow,
then I would appreciate it. I'm kind of a noob at VB, as I'm used to
c++ and C#. |