dbTalk Databases Forums  

Conditional Transformation if Overflow

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Conditional Transformation if Overflow in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shumaker@cs.fsu.edu
 
Posts: n/a

Default 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#.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.