How do you convert varchar to a float

  • I am creating a table in SQL 2008 the problem I am having is with a column that is set as the PK. Data is being imported via SSIS package.

    One of the columns "PROVIDERID" is set as a [PROVIDERID] [varchar](50) NOT NULL also the PK. I want to convert this column because when I import the PROVIDERID it is importing like 4.66E+18. How can I convert this to a float or something that will give me something like this ie 42.12345678901234567890.

    Thank you,

    Kevin

  • In the SSIS package, use the Data Conversion control in "Data Flow Transformations" to convert it on the fly, the output into your table will then be a float

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • The Data Conversion within the SSIS package worked.

    Thank you

  • Awesome! Please mark the post as helpful so others will know to use the same 😉

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

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

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