Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with decimal field being rounded 1

Status
Not open for further replies.

luciddream

Programmer
Nov 8, 2000
712
US
Hi,

I'm having a very frustrating problem. I am trying to update a decimal field, scale 9, precision 18 , with an update statement. something along the lines of:

update table set field = 4.5 where id = 12

anyways, the decimal is being rounded, for some ungodly reason. I really don't think it's practical for me to write a stored procedure just to get this field to update with the correct value. If anyone has has a similar problem, or knows a solutions, please, this is very frusttrating.

Thanks,
luciddream

aschuster@sftsolutions.com
 
It works on my system. The scale is definitely 9? It defaults to (18,0) when you create a decimal column. That would force it to round the 4.5.
-Karl

[red] Cursors, triggers and user-defined functions are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Thank you, I'm an idiot, apparently. I don't know why i assumed the scale was 9, i probably should have checked and saved myself a couple hours of banging my head on the desk.

or i guess it might be the head banging that made me assume..

anyways.. thanks

aschuster@sftsolutions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top