question

patdev-3689 avatar image
0 Votes"
patdev-3689 asked Monalv-msft edited

SSIS hangs on the lookup update

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-generalsql-server-transact-sqlsql-server-integration-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Monalv-msft avatar image
0 Votes"
Monalv-msft answered Monalv-msft edited

Hi @patdev-3689 ,

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.





df.png (49.7 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Mona

that helped great.

but got stuck at delete portion now.

the data comes in as DT_I4 from the flat file. on the database it is int.

any suggestion?

0 Votes 0 ·

Hi @patdev-3689 ,

1.that helped great.
Please click "Accept Answer" and upvote the answer if it is helpful. Thank you.

2.but got stuck at delete portion now.
Could you please share the error messages?

Best regards,
Mona



0 Votes 0 ·

Hi @patdev-3689 ,

May I know if you have anything to update?

Best regards,
Mona

0 Votes 0 ·

Hello Mona

that helped great.

but got stuck at delete portion now.

the data comes in as DT_I4 from the flat file. on the database it is int.

any suggestion?

0 Votes 0 ·