Convert Scientific Notation to String - SSIS

  • I am importing a CSV into my database using SSIS and one of the fields is in scientific notation in the CSV. How can I convert that field to an integer and then to a string using a derived column?

    I have tried the following, but it doesn't work:

    (DT_STR,50,1252)((DT_I8)([FIELD_NAME]))

    I still get the value being put into the database base scientific notation and when I check the data viewer its coming out of the derived column in scientific notation form. Any ideas?

  • Haha, I forgot to map the new derived column to the table column. Looks like that method did work!

  • Triality (12/20/2011)


    Haha, I forgot to map the new derived column to the table column. Looks like that method did work!

    I think that implicit conversion also works. If you insert those strings in scientific notation directly into an INT column in SQL Server, SQL Server will do the conversion for you. (I have to test that though).

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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