How can we apply excel ceiling function with significance value in SQL server ?

```=Ceiling(10,3)
```

it should return 12, because 12 is roundup nearest to 3

```=Ceiling(36,7)
```

it should return 42, because 42 is roundup nearest to 7 Apr 1 in Database 46 views

## 1 answer to this question.

If the underlying data types and rounding functions are not understood, rounding can be misconstrued. The rounded value varies depending on the data type (integer, float, decimal, etc.). Furthermore, the numbers can differ depending on the SQL Server rounding function (ROUND(), CEILING(), FLOOR()) used in the calculation. As a result, it's critical to determine the user's rounding requirements before translating them into the proper T-SQL statement.

ROUND - Rounds a positive or negative value to a specified length, accepting one of three values:
To round the value

Numbers can be positive or negative.

This data type can be int (small, medium, large), decimal, numeric, money, or smallmoney.

When rounding, be precise.

On the right side of the decimal point, a positive number rounds.

On the left side of the decimal point, a negative number rounds.

When this value is not 0 or not included, the value is truncated to round.

CEILING - Evaluates the right-hand decimal value and returns the smallest integer greater than or equal to the specified numeric expression, accepting only one value:

To round the value

FLOOR - Evaluates the right-hand decimal value and returns the largest integer less than or equal to the specified numeric expression, accepting only one value:
To round the value answered Apr 4 by
• 13,460 points

## What are the different authentication modes in SQL Server? How can it be changed?

Windows mode and Mixed Mode – SQL ...READ MORE

## How Can I use "Date" Datatype in sql server?

There's problem in all of them and ...READ MORE

## How can I calculate deciles with a range of 12,000 cells in excel?

1. Enter the following formula in cell ...READ MORE

## How can we perform common set operations (union, intersection, minus) in MS Excel?

The MATCH function can be used as ...READ MORE

## How do I UPDATE from a SELECT in SQL Server?

MERGE INTO YourTable T USING ...READ MORE

## How do I UPDATE from a SELECT in SQL Server?

INSERT INTO Table (col1, col2, col3) SELECT col1, ...READ MORE

## How to delete duplicate rows in SQL Server?

CTEs and ROW_NUMBER can be combined together which will ...READ MORE

## Function vs. Stored Procedure in SQL Server

Functions are calculated values that cannot make ...READ MORE