Import numbers from flat file and format with decimal

  • I am importing data from a flat file in the format of 9999, when I import it into my SQL Server tables, i need it to be 9.999. This includes 0600 being 0.600. I have been racking my brain all morning trying to used a derived column transformation editor, but I am not getting the expression correct. Does anyone have any insight as to accomplish what I am trying to do?

    Thanks,

    Michale

  • Divide it by 1000.

  • What is the data type of the column you're importing the data in to?

    John

  • Dev (1/10/2012)


    Divide it by 1000.

    I was gonna say that, but it couldn't be that obvious. 😀

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • make it a string. break it into 2 parts and stick a decimal in there, then convert back to desired numeric data type.

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

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