.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Round in sql

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
Hi, How can i round  56.1234 to 56.12, when i try with round method in sql gives 56.1200 value i need only 2 decimal places ThanksVineeth

View Complete Post

More Related Resource Links

Round off time to the nearest minute

How would you round this up to the nearest minute? There isn't a built in function to do this so you have to use a little bit of maths to get there. There are 60 seconds in a minute. We already have 38 seconds on the clock. So we need to add on 60 - 38 = 22 more seconds.

Net Matters: Round-Robin Access To The ThreadPool


Stephen Toub shows you how to add round-robin scheduling support on top of the ThreadPool for more granular processing control.

Stephen Toub

MSDN Magazine January 2009

Utility Spotlight: 12 Steps To Faster Web Pages With Visual Round Trip Analyzer


Download Visual Round-trip Analyzer (VRTA) to uncover the root of your Web page loading problems and identify these 12 common ailments.

Jim Pierson

MSDN Magazine November 2008

decimal value validation and round off by javascript

The article decimal value validation and round off by javascript was added by hiral.hapani on Wednesday, June 02, 2010.

Hi All, I have createdone javascript by which you canvalidate a decimal value of any textbox for which you want. By thisjavascriptwecan bind user to enter only digits in textbox. and when he will enter any decimal value javascript will do round off it

round function in vb.net related to system.math

when i finding the value to round some decimal or double number below problem i faced system.math.round(12.50)        ans: 12 system.math.round(12.51)        ans: 13 the same problem also in floor function .........these problems in framework 3.5 and framework 4.0 also

Give image round corners

Hello, I would just like to know if anyone can give me some advice on how to take a jpeg image and make the corners rounded at runtime using gdi+ and aspnet. Thanks in advance Wesley

SQL Round function dosen't act like Math.Round in VB.Net


I'm trying to calculate a customer tax.

Select 100 * Round(25296 /100 ,1) --returns 25200

 however Math.Round in Visual Basic, return 25300.

 Result = 100 * Math.Round(25296 / 100) ' returns 25300

I really nead any appropriate function to fix it.

Plese help soon.

Please advise on ROUND function


Not my original db, data or procedure as I have been tasked with developing an updated infosys (to a .NET app and SQLServer db).  Anyway, the original app/db has a rounding specification that is a bit strange to me and need some input on how I should proceed.  The original system architects decided they'd perform a round down on a particular field (int) which is ultimately used in a fee calculation.

Not a big deal because I could just issue a ROUND(theField, -2) --- But I found a problem.  At first glance it seemed that they wanted to round to the 10th:

3143 would round to 3100 with ROUND(3143, -2)

But if I come across a value such as 4075 this would then round to 4100 with ROUND(4075, -2)  WHEN THEY WANT THIS TO BE 4000.  That is, to arrive at 4000, then I'd need to issue a different ROUND(4075, -3)

Does this make sense? 

How should I approach this? 

 Is this a proceedure/logic probelm or am I looking at this with too limited vision in what needs to be done (SQL-wise)?


Thanks for your input,




James Crandall ~ http://javitechnologies.com Spatial Database Solutions

How to make asp:menu tabs with round top corners


I am using asp:menu control to display horizontal menu.


I need to display tabs with rounded top corners.


Any idea how can I do that? 

Round off Decimal to 2 places in jQuery


Hi everyone,

How come the following code does not work:



var t_o_t_a_l = parseFloat(total.toString()).toFixed(2);



Round Slider control


Is there a way to customize a slider to be round - basically I want a user to be able to turn a dial like control - I figured a slider would be best since I need a percentage value? Any suggestion/ideas would be helpful on how to go about doing this?


Round Gridview footer template textbox value based on this JavaScript



This is my aspx javascript to get total in gridview footer template.. its working fine

The problem is : some time it show footer value is 6.9999999999

I need 6.99 as a result how to achieve this.

Aspx page:-

<script type="text/JavaScript">
function updateControls(elementId)
 var parentElementRef = document.getElementById(elementId);
 var elementRefArray = parentElementRef.getElementsByTagName('INPUT');
 var textBoxTotals = 0;

 for (var i=0; i<elementRefArray.length; i++)
  var elementRef = elementRefArray[i];

  if ( (elementRef.type == 'text') && (elementRef.gridTextBoxType == 'calcTextBox') )
   var textBoxAmount = parseFloat(elementRef.value);
   if ( isNaN(textBoxAmount) == true )
    textBoxAmount = 0;

   textBoxTotals += textBoxAmount;

 if ( isNaN(textBoxTotals) == true ) 
  textBoxTotals = 0;

 for (var i=0; i<elementRefArray.length; i++)
  var elementRef = elementRefArray[i];

  if ( (elementRef.type == 'text') && (elementRef.gridTextBoxType == 'totalsTextBox') )
   elementRef.value = textBoxTotals;
// -->


protected void Gridview1_RowDataBound(object sender, Grid

jquery round corner plugin doesn't work for me


 i've try http://jquery.malsup.com/corner/,but doesn't work for me ,i mean the parent color and transparency are preserver,the corners are blue colored.

Can you help with this please?

Thank You!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend