Share via

SSIS hangs on the lookup update

pat dev 1 Reputation point
Mar 25, 2021, 5:45 PM

Hello all,

I am trying to improt flat file to sql:

problem:

csv source datatype dt_str data format : "1/2/2019 12:00:00 AM"

the data type in database is datatime2(7) = 2019-01-02 00:00:00.0000000

I tried setting the flat file source to data tie dt_dbtimestamp2 with scale 7

casting to varchar50 in lookup is hanging the package. inert goes fine.

Any suggestion and help pleasee!!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,490 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,657 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,690 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalv-MSFT 5,906 Reputation points
    Mar 26, 2021, 2:51 AM

    Hi @pat dev ,

    We can use Derived Column Transformation to convert the datatype from dt_str to dt_dbtimestamp2.

    Expression: (DT_DBTIMESTAMP2,7)((DT_DBDATE)(TOKEN(Date," ",1)))

    Please refer to the following pictures:
    81763-df.png
    81648-derivedcolumntransformation.png

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    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.


Your answer

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