locked
SSIS Integration - Text to Numeric RRS feed

  • Question

  • I have a text field (in input and output). I need to multiply this field by 100 and populate the SQL database field (text).

    I am using the Derived Column and here is what isn't working:

    NewColumn = ((DT_STR,15,1252)((DT_NUMERIC,10,2)Column * 100))

    Thanks for any help!

    Friday, November 16, 2012 1:13 PM

Answers

  • Show some example values (f.e. are you using 10,1 or 10.1)... and post the error.

    This works for me (with a correct number as string):
    (DT_STR,15,1252)((DT_NUMERIC,10,2)([YourColumn]) * 100)


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    • Marked as answer by Eileen Zhao Thursday, November 22, 2012 2:12 AM
    Friday, November 16, 2012 10:23 PM

All replies

  • Any errors?

    MCSA SQL Server 2012 - Please mark posts as answered where appropriate.

    Friday, November 16, 2012 1:44 PM
  • Try

    (DT_WSTR,15)   ((DT_NUMERIC,10,2) Column * 100)


    Please mark ANSWERED if my reply contributed to your solution.

    Friday, November 16, 2012 8:49 PM
  • Show some example values (f.e. are you using 10,1 or 10.1)... and post the error.

    This works for me (with a correct number as string):
    (DT_STR,15,1252)((DT_NUMERIC,10,2)([YourColumn]) * 100)


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    • Marked as answer by Eileen Zhao Thursday, November 22, 2012 2:12 AM
    Friday, November 16, 2012 10:23 PM