Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 27th, 2003, 02:04 AM
Authorized User
 
Join Date: Jun 2003
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Format rounding figure : 1235.00 => 1200.00



:)hi, may i know how can I write a SQL Transact as mentioned as above>

that is if a figure is 1235.00 then i need it rouding up to 1200.00
any fixed format to convert this kind of rounding?



Thanks.


Jane
 
Old June 27th, 2003, 02:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually you are rounding that down. Anyway try using ROUND(Value, -2), eg:

DECLARE @Var Decimal(6,2)
SET @Var = 1249.00
PRINT ROUND(@Var, -2)

regards
David Cameron





Similar Threads
Thread Thread Starter Forum Replies Last Post
Is 9:00 > 08:30 true or false? cJeffreywang ASP.NET 2.0 Basics 5 February 3rd, 2008 12:16 AM
Moving 2,00,000 records effectively FileFound Visual Studio 2005 9 September 21st, 2007 08:20 AM
file cannot load with apache2.00.55 GOUR CHANDRA PAUL PHP How-To 1 February 12th, 2006 06:22 PM
add a '.00' crmpicco Classic ASP Basics 1 February 15th, 2005 06:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.