i have write the date and time column query in Sql Server with IsNull condition.. i have mentioned that query in below..
i want that query is, how to write the ssis derived column . i have written that query in ssis but some cast type error comes..
here concatenate the date and time columns.
please help me,
Sql Query —
CAST(ISNULL(CONVERT(Nvarchar(10),InitialDate,101), '01/01/1900') AS Nvarchar(10))+ ' ' + ISNULL(CONVERT(NVarChar(8),InitialTime,108), '00:00:00') as CourtDttm
SSIS Derived column
(DT_DBTIMESTAMP)((DT_STR,255,1252)(ISNULL(InitialDate) ? ((DT_DBTIMESTAMP)"01/01/1900") : (InitialDate)) + " " +
((DT_STR,255,1252)(ISNULL(InitialTime) ? ((DT_DBTIMESTAMP)"00 : 00 : 00") : (InitialTime))))
Errors --[Derived Column [40]] Error: An error occurred while attempting to perform a type cast.
I think you’re looking for:
If you use DT_DBTIMESTAMP, you’ll have to fill in the date part like you did for InitialDate.