dbTalk Databases Forums  

SSIS: best data flow transformation for converting bad dates to nu

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


Discuss SSIS: best data flow transformation for converting bad dates to nu in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Norman
 
Posts: n/a

Default SSIS: best data flow transformation for converting bad dates to nu - 01-05-2006 , 05:18 PM






Source is varchar, want to convert to datetime but need to null any bad dates
first.

Can't use the derived column transformation as it doesn't support the ISDATE
function.

I could feed the error rows to a derived column which converts to null based
on errorcode and then union all with the successful rows but this is a
cumbersome option.

I'd prefer a solution that doesn't involve script components or ole db
commands.

Thanks in advance
David

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SSIS: best data flow transformation for converting bad dates to nu - 01-05-2006 , 05:27 PM






Hello David,

Why not use a RegEx transform? That way you can validate the value.

We have one here. We'd love to know how you get on with it as well

http://www.sqlis.com/default.aspx?91


Allan

Quote:
Source is varchar, want to convert to datetime but need to null any
bad dates first.

Can't use the derived column transformation as it doesn't support the
ISDATE function.

I could feed the error rows to a derived column which converts to null
based on errorcode and then union all with the successful rows but
this is a cumbersome option.

I'd prefer a solution that doesn't involve script components or ole db
commands.

Thanks in advance
David



Reply With Quote
  #3  
Old   
David Norman
 
Posts: n/a

Default Re: SSIS: converting bad dates to null - 01-05-2006 , 05:55 PM



Thanks but I have to keep the installation clean so I won't be using any
third party components.


"Allan Mitchell" wrote:

Quote:
Hello David,

Why not use a RegEx transform? That way you can validate the value.

We have one here. We'd love to know how you get on with it as well

http://www.sqlis.com/default.aspx?91


Allan

Source is varchar, want to convert to datetime but need to null any
bad dates first.

Can't use the derived column transformation as it doesn't support the
ISDATE function.

I could feed the error rows to a derived column which converts to null
based on errorcode and then union all with the successful rows but
this is a cumbersome option.

I'd prefer a solution that doesn't involve script components or ole db
commands.

Thanks in advance
David

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.