Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SQL round to dollar

Posted on 2006-04-18
7
Medium Priority
?
683 Views
Last Modified: 2012-08-13
I want to do a global 10% increase on the prices in my products table, but I dont want the odd pennies.

99.45 rounded to 99 even etc.
0
Comment
Question by:webdork
  • 4
  • 3
7 Comments
 

Author Comment

by:webdork
ID: 16484688
SQL server
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 16484694
select round (99.45,0)
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16484699
you mean
99.45 to ->99.00  or something else
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:webdork
ID: 16484703
Like this?

update ecommproducts set [regular price] = round(([regular price]*1.10),0)  where domainid = 3
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16484745
your query seems to be ok
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16484751
try these and choose the desired onr

select round (99.45*1.10,0)
SELECT CEILING(99.45*1.10)
SELECT FLOOR(99.45*1.10)
0
 

Author Comment

by:webdork
ID: 16484758
That did it. Too easy...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Exchange database can often fail to mount thereby halting the work of all users connected to it. Finding out why database isn’t mounting is crucial and getting the server back online. Stellar Phoenix Mailbox Exchange Recovery is a champion product t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question