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

Int Field not Outputting Decimal Point

Status
Not open for further replies.

JDTurk

IS-IT--Management
Sep 3, 2009
86
US
When viewing a payroll record on a GUI screen, amt09(int, Null) is displayed as 61.77. When I output the data using SQL, the amount is 6177. How can I get the decimal point to appear? Thank you.

S8730 Processors (Redundncy/Mirror Img)
Aura 5.2 (Communication Manager)
Modular Messaging 5.2
 
divide by 100.00

Code:
Select amt09 / 100.00
From yourtable


-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thanks George. Any way I can shorten the number of decimal places to two?

S8730 Processors (Redundncy/Mirror Img)
Aura 5.2 (Communication Manager)
Modular Messaging 5.2
 
Select Convert(Decimal(10,2), amt09 / 100.00)
From yourtable

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Perfect! Thanks George. Happy holidays!

S8730 Processors (Redundncy/Mirror Img)
Aura 5.2 (Communication Manager)
Modular Messaging 5.2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top