November 17, 2010 at 3:18 am
Hi Guys
I'm a newbie to using conditional splits in SSIS and encountered the following problem.
I am trying to create a conditional split to check if one date doesn’t match another, using the following expression:
((ISNULL(Registered_DateTime) ? "" :Registered_DateTime) != (ISNULL(Dest_Registered_DateTime) ? "" : Dest_Registered_DateTime))
However it doesn’t seem to be working, I’ve highlighted the error it states that data type DT_WSTR and DB_TIMESTAMPS are incompatible data types.
I’ve tried putting different CAST expressions in but with no luck.
Anyone have any ideas on what I could do?
Thanks
November 17, 2010 at 3:52 am
I think this is happening because you're trying to have an empty string as a date. You can't do this - you either need to choose a placeholder date (so far in the past or future that it can only be interpreted as such) or, better still, leave it as a NULL - this is what NULL was invented for.
John
November 17, 2010 at 4:03 am
Hi
Thanks for that, got it working in the end by using
((ISNULL(Registered_DateTime) ? (DT_DBTIMESTAMP)"9999-12-31" : Registered_DateTime) != (ISNULL(Dest_Registered_DateTime) ? (DT_DBTIMESTAMP)"9999-12-31" : Dest_Registered_DateTime))
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply