Share via

null in start date

Shambhu Rai 1,411 Reputation points
2022-04-07T19:07:11.39+00:00

Hi Expert,

there is null in start date column in ssis and package is failing due to it considering dt_wstr and target it is date in datatype
190980-image.png
want to replace it with '1900-01-01'

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

SQL Server Integration Services
SQL Server Analysis Services
SQL Server Analysis Services

A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.


4 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 27,196 Reputation points
    2022-04-07T20:43:19.48+00:00

    Hi @Shambhu Rai ,

    SSIS has a much better function: replacenull-ssis-expression

    Please try the following expression:

    REPLACENULL(Start Date, "1900-01-01")  
    

    Or

    (DT_DATE)REPLACENULL(Start Date, "1900-01-01")  
    

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. ZoeHui-MSFT 41,551 Reputation points
    2022-04-08T01:59:41.577+00:00

    Hi @Shambhu Rai ,

    You may also use

    (ISNULL([Start Date]) ? (DT_DBDATE)"1900-01-01" : [Start Date])  
    

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  3. Shambhu Rai 1,411 Reputation points
    2022-04-07T19:56:20.92+00:00

    ERROR MESSAGE

    The ProcessInput method on component "Derived Column" (1) failed with error code 0xC0209029 while processing input "Derived Column Input" (7). The identified component returned an error The ProcessInput method on component "Derived Column" (1) failed with error code 0xC0209029 while processing input "Derived Column Input" (1). The identified component returned an error

    Was this answer helpful?

    0 comments No comments

  4. Shambhu Rai 1,411 Reputation points
    2022-04-07T19:47:57.4+00:00

    I TRIED

    ISNULL([Start Date]) ? (DT_DBDATE)"1900-01-01" : (DT_DATE)[Start Date] but not working

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.