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

Decimal Points

Status
Not open for further replies.

krotha

Programmer
Joined
Nov 5, 2000
Messages
116
Location
US
Hi
I have small question.
If I select at my query analyzer
select 1030/100 results 10. But I want upto two decimals(10.30) How shall I do.

Thanks For your help.
 
Depending on what you're trying to do:

select convert(decimal(4,0),1030) /convert(decimal(4,0),100)

or

select convert(decimal(6,2), 1030.0 /100.0)
 
Thanks It helps. Based on this I will modify my query.

Thanks a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top