July 9, 2010 at 1:00 am
somehow not getting this to work in derived columns
Condition is: if enddate is Null (space) then keep space else format like yyyy-mm-dd.
i/p to date column is 31-12-2000
isnull[Enddate]? " " :SUBSTRING(Enddate,7,4) + "-" + SUBSTRING(Enddate,4,2) +"-" + SUBSTRING(Enddate,1,2)
July 9, 2010 at 2:51 am
SSIS have taken the below syntax in derived column but when I execute the task it passes an error.
Error is :
SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (221)" failed because error code 0xC0049063 occurred, and the error row disposition on "input column "Einddatum_new" (243)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
Any more ideas on this???
(Enddate_new) == " " ? NULL(DT_DATE) : ((DT_DATE)(SUBSTRING(Enddate_new,7,4) + "-" + SUBSTRING(Enddate_new,4,2) + "-" + SUBSTRING(Enddate_new,1,2)))
July 9, 2010 at 3:13 am
What is the datatype of your derived column?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 9, 2010 at 3:15 am
DT_Date
July 9, 2010 at 3:18 am
You can't put a space in a date field.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 9, 2010 at 3:21 am
How do you write expression to put NUll (empty) value in date field when i/p has NULL value else cast it in YYYY-MM-DD format.
My i/p file is CSV file (the col has data type of DT_DATE) and destination column is timestamp too.
July 9, 2010 at 3:26 am
Try NULL(DT_DATE)
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 9, 2010 at 3:28 am
My expression looks like
(Enddate_new) == " " ? NULL(DT_DATE) : ((DT_DATE)(SUBSTRING(Enddate_new,7,4) + "-" + SUBSTRING(Enddate_new,4,2) + "-" + SUBSTRING(Enddate_new,1,2)))
I guess it says the same.
Let me know if I wrote something incorrect
July 9, 2010 at 3:41 am
Finally I got this to work!!!
Just changed the configure error to ignore failure (its bad n risky !!)
But it worked and gave me the values I need.
But something I dont understand is why should this error come???
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply