Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Can't insert a Decimal?

Author  Topic 

label
Posting Yak Master

197 Posts

Posted - 2004-12-06 : 13:56:04
I've got a table that contains 2 decimal fields, one called "Time_Required" and the other called "Drawings".

I've got a query that will update this field with the following code:


update pattern_codes
set time_required=convert(decimal(10, 5), 1.5) + convert(decimal(10, 5), (.15 * convert(decimal(10,5), drawings)))


However, instead of seeing

9.00
2.75
5.15

type of results, all's I get are

9
3
5

Any thoughts on this?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-12-06 : 13:58:10
it seems time_required is integer...

Go with the flow & have fun! Else fight the flow
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-12-06 : 14:14:51
Post the DDL of the table...and why are you converting 1.5?



Brett

8-)
Go to Top of Page

label
Posting Yak Master

197 Posts

Posted - 2004-12-06 : 14:29:15
quote:
Originally posted by X002548

Post the DDL of the table...and why are you converting 1.5?



Brett

8-)




I was converting the 1.5 basically cause I could think of nothing else to do to fix the problem. However, I've since converted the column to a "float" type and it works just fine now so go figure.

Go to Top of Page
   

- Advertisement -