Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP 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 May 2nd, 2005, 06:50 AM
Registered User
 
Join Date: Mar 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to haji_mb Send a message via Yahoo to haji_mb
Default Round off the number in SQL

Hi,
I want to round off the number in the SQl query.
but the answer should be like
if i give 8.4 or less it should return 8
if i give 8.5 it should return 8
if i give 8.6 or more it should return 9

Is it possible? if yes please give me the solution. i need it urgently.
I am using vb.net as the front end.

Thanks


With regards
Haji Muffadal
 
Old May 2nd, 2005, 07:37 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you expect 2 decimals Add 0.49 and floor the result






Similar Threads
Thread Thread Starter Forum Replies Last Post
Number formatting in SQL 2000 mas7004 SQL Server 2000 3 December 11th, 2007 01:16 PM
generate Random number in MS SQL server 2000 nax111 SQL Server 2000 9 March 29th, 2007 10:14 PM
round up a decimal number semooth VB How-To 3 October 4th, 2005 02:33 PM
VBA SQL import from Excel number format aem Excel VBA 0 January 19th, 2005 02:28 AM
How to check TCPIP Port Number for SQL Sever jdang67 SQL Server 2000 6 October 22nd, 2004 04:00 PM





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