I have an Excel spreadsheet with three columns of data, one of which is a "Score". The score will range between 1.0 and 0, going out to two decimal places. I am able to get this data into a global temporary table. I have a script in which a message box pops up, displaying the MIN value of the "Score" field in the temp table. The MIN value is .2. When I try to get the data from the temp table to a staging table, the Scores are all rounded to the nearest whole number. I think I've tried using every numeric data type for the staging table, and I always get the same results. In the temp table, Score is defined as such:
[Score] [decimal](18, 0) NULL
Does anybody know what I need to do to get the score to display acccurately?
Lindsay
Make Score a decimal (18,2)
The "2" refers to the number of decimal places after the decimal point.
(actually you could get away with much less than 18.)
Dylan.
|||I'm sorry, Score is defined in the temp table as 18,5 not 18,0.
I also changed Score in the staging table to 18,5 as opposed to Float, but I'm still getting the same results.
|||I found the problem. I was changing a different column using Derived Column Transformation, and the Score field was also in there, converting it to a string. Deleted it, and now I'm back in business Thank you for forcing me to look harder|||Sometimes I find that if I ask the question, I end up finding the solution.
Something about framing the question forces you to really think about the solution.
Please mark the thread as Answered, though!
Dylan.
No comments:
Post a Comment