dbTalk Databases Forums  

SSIS & Script Transformation (debug vs normal)

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


Discuss SSIS & Script Transformation (debug vs normal) in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
jhofmeyr@googlemail.com
 
Posts: n/a

Default Re: SSIS & Script Transformation (debug vs normal) - 03-14-2008 , 05:19 AM






Hi Anthony,

Instead of returning null, try outputing the computed string to an
error row. This will allow you to check that the dates are being
correctly formatted into strings.

Also - this type of thing *is* possible using derived column
expressions (but for simplicity in this case using 2 derived column
tasks would be easier. 1st converts to string (and pads the leading
"0"), 2nd joins strings and inserts dividers). I would also recommend
using the date string format "yyyy-mm-dd" as I believe in SSIS this is
universally converted correctly.

You can also do away with all those case statements by doing:

Dim syymmdd As String
syymmdd = Right("000" + Row.OBIVDT.ToString(), 6)

at the top and then using syymmdd.Substring(...) when you're inserting
your dividers.

Good luck!
J

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.