Data Conversions Problem

  • Hi,

    My datasource is a flatfile (.TXT)

    1)Column - US1_UNITS - datatype- nvarchar

    2) Column - US1_DOC_DATE -datatype- nvarchar

    In my destination table(sql server 2008) the data type of ths column is decimal(20,4) and datetime

    I am using Data convertion Transformation to convert this Through SSIS package. Can you Please tell me how to do this.

  • Just stick the Data Conversion inbwtween souce and destination appropriately.

    Can u post real values one of each for each column here? I don't think there is a concept of Nvarchar in flat file? I might be wrong as I am not sure what data looks like or u talking abut?

    A flat file either will have character, a numeric value, and in some cases like special characters like &, *, ˜, ç, ? or empty space.

  • This are the values i have in the flatfile US1-UNIT-PRICE US1-DOC-DATE

    100.00 20090614

    50.00 20090614

  • U shouldn't have prbl. RUn this is SQL

    DECLARE @UNIT Nvarchar(10)

    SET @UNIT = '100.00'

    SELECT CONVERT(decimal(20,4), @UNIT)

    DECLARE @DATE Nvarchar(10)

    SET @DATE = '20090614'

    SELECT CONVERT(datetime, @DATE)

    I think u are doing something wrong in data converstion step. Add 2 dataviewers on the pipeline and see the change in data after converstions. Looks how ur sql tbl is columns are defined

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply