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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decimal numbers

Status
Not open for further replies.

happyIndian100

Programmer
Jul 20, 2003
66
US
a simple question,

select cast(156/100 as numeric(13,3))

output i get is 1.000

but in actual it should be 1.560

please help...

 
Integer math before the conversion to decimal. Try this instead.

select cast(156 as numeric(13,2)) / Cast(100 as numeric(13,3))


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top