Sunday, February 19, 2012

Data type issues

One:

I can't map in the Lookup Transformer editor from my input (a string) that has been modded using the following in the Derived Column Transformer as follows:

Formatted_Date

((DT_DATE)(SUBSTRING([IN-DT-CYMD-TRANS],5,2) + "-" + SUBSTRING([IN-DT-CYMD-TRANS],7,2) + "-" + SUBSTRING([IN-DT-CYMD-TRANS],1,4)))

database_date (DT_DBDATE)

The destination field has the data type "datetime", according to Management Studio.

Two:

I have almost the exact same problem with another mapping, trying to cast a string to an int (INT is not one of the choices in my list...):

Batch_Code_As_Int

((DT_NUMERIC,1,1)([IN-BAT-NBR]))

numeric [DT_NUMERIC]

Any thoughts?

Thanks!

Jim Work

Jim Work wrote:

One:

I can't map in the Lookup Transformer editor from my input (a string) that has been modded using the following in the Derived Column Transformer as follows:

Make your derived column type a DB_TIMESTAMP and see if that works.

Jim Work wrote:


Two:

I have almost the exact same problem with another mapping, trying to cast a string to an int (INT is not one of the choices in my list...):

Batch_Code_As_Int

((DT_NUMERIC,1,1)([IN-BAT-NBR]))

numeric [DT_NUMERIC]

Try DT_I4 (a 32-bit integer)

No comments:

Post a Comment