DickChristoph
3/25/2007 9:39:00 PM
Hi
It appears to work for me in SQL 2005. Could it be that you are using a
stored procedure and are not using the same precision on the parameter that
is being inserted?
Create Table TestPrec(Data decimal(38,19))
insert TestPrec values('123456789.123456789')
insert TestPrec values('1.123456789')
select * from testprec
Results in
Data
---------------------------------------
123456789.1234567890000000000
1.1234567890000000000
-Dick Christoph
612-724-9282"cpnet" <cpnet@noemail.noemail> wrote in message
news:emwHTGybHHA.5052@TK2MSFTNGP05.phx.gbl...
>I need to store some values in my SQL Server 2005 database with 4-5 digits
>to the left of the decimal and about 14 to the right. I tried creating
>columns with the type: decimal(38,19). I would expect this would give me
>19 digits to the right and left of decimal. I've copied a value into this
>column (in the SQL Server Management studio) that looks like this:
>
> 123456789.123456789
> and
> 1.123456789
>
> When I post these to the database then refresh the grid, I see:
> 123456789.1235000000000000000
> and
> 1.1235000000000000000
>
> I've checked the value of @@MAX_PRECISION, and it's set to 38.
>
> Why is it rounding to 4 digits after the decimal? I've tried with
> decimal(36,18) so I'm not maxing things out, and I still only get 4 digits
> to the left of the decimal.
>
> Thanks
>
>