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!

Rounding up to the nearest dollar amount

Status
Not open for further replies.

jaggar

Programmer
Jan 23, 2003
21
US
How do you code a variable which have dollars and cents amount in SQL to round up to the nearest dollar?

Thanks...
 
select ceiling(5.2)

--------------------
Procrastinate Now!
 
What means nearest?
What you wantfrom this:
[tt]
6.43 -> 6 or 7
6.51 -> 6 or 7
[/tt]

Check these functions in BOL:
ROUND()
CEILING()
FLOOR()
and decide what you want.

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top