June 16, 2010 at 9:17 am
I have a decimal data type the values in there now look like:
1233555
I need i to look like:
12335.55
I've tried chaning it from (8,0) to (18,2) but that didn't work..
June 16, 2010 at 9:31 am
Changing the scale is not going to automatically put two numbers behined the decimal point, it just says that you can now have numbers there.
You are chaning the value of the number by putting two digits behined the decimal point. One way to easily acheive this is to divide the number by 100
June 16, 2010 at 9:36 am
As steveb said:
DECLARE @First DECIMAL(8,0)
DECLARE @Second DECIMAL(8,2)
SET @First = 1233555
SET @Second = @First / 100
SELECT @Second
June 16, 2010 at 9:39 am
well this is for an ssis package..and theres no data translation
so as a sanity check - I'm thinking they are sending us the data incorrectly because with scale I can only change the decimal to the right, correct?
June 16, 2010 at 9:48 am
Scale will not change the data, I would check the data sources that you are using to see whether or not the values in there have the decimal point.
June 16, 2010 at 11:33 am
okay...just so im sure about this before I talk to my boss...
the value from the vendor I'm importing is '584375.00000'
there's no way for me to change that to '5843.75' using table/schema changes ? (without using code)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply