The following should work. After reading your question, I’m not exactly sure what you want 100 to return. For this 100 returns 100.
select floor((X + 99) / 100) * 100;
This gives the following results:
0 -> 0 1 -> 100 99 -> 100 100 -> 100 101 -> 200
Related Posts:
- Java Round up Any Number
- How to round a number to significant figures in Python
- Converting bytes to megabytes
- Converting 3D polar coordinates to cartesian coordinates
- What is the C++ function to raise a number to a power?
- Unfamiliar symbol in algorithm: what does ∀ mean? [closed]
- How can I use “e” (Euler’s number) and power operation in python 2.7
- Python division
- Integer division in Java [duplicate]
- What does the ^ (XOR) operator do? [duplicate]
- Safest way to convert float to integer in python?
- How can I use “e” (Euler’s number) and power operation in python 2.7
- Calculating a 2D Vector’s Cross Product
- JavaScript exponents
- What does != do/mean in python
- How to perform an integer division, and separately get the remainder, in JavaScript?
- How to perform an integer division, and separately get the remainder, in JavaScript?
- Clamping floating numbers in Python?
- Lua replacement for the % operator
- How do you find the rightmost digit of an integer?
- What is the fastest factorial function in JavaScript?
- How to perform bilinear interpolation in Python
- What is the most efficient way to calculate the least common multiple of two integers?
- What is the most efficient way to calculate the least common multiple of two integers?
- How can I convert a number from base 8 to base 10?
- Inverse of Tan in python (tan-1)
- Inverse Cosine in Python
- What is the maximum number of edges in a directed graph with n nodes?
- How to save decimal in java
- Probability of hash collision
- Rotating a Vector in 3D Space
- Mathematica matrix diagonalization
- In a triangulated isometric grid, what triangle is a given point in?
- Why prefer two’s complement over sign-and-magnitude for signed numbers?
- 1000 * 60 * 60 * 24 * 30 results in a negative number [duplicate]
- LIKE vs CONTAINS on SQL Server
- How do you round UP a number?
- How do you round UP a number?
- What is an MDF file? [closed]
- Selecting COUNT(*) with DISTINCT
- Case in Select Statement
- What is a stored procedure?
- What is the difference between varchar and nvarchar?
- LEFT JOIN vs. LEFT OUTER JOIN in SQL Server
- How to round a number to n decimal places in Java
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- numpy max vs amax vs maximum
- Inserting multiple rows in a single SQL query? [duplicate]
- How to round to at most 2 decimal places, if necessary?
- What do Clustered and Non-Clustered index actually mean?
- How to round to at most 2 decimal places, if necessary?
- LEFT JOIN vs. LEFT OUTER JOIN in SQL Server
- How to drop a table if it exists?
- SQL Server: Difference between PARTITION BY and GROUP BY
- Conversion failed when converting date and/or time from character string while inserting datetime
- Self Join to get employee manager name
- How do I UPDATE from a SELECT in SQL Server?
- Is there a Boolean data type in Microsoft SQL Server like there is in MySQL? [duplicate]
- What do these operators mean (** , ^ , %, //)? [closed]
- SQL query to select dates between two dates
- What do these operators mean (** , ^ , %, //)? [closed]
- Conversion failed when converting date and/or time from character string while inserting datetime
- When should I use CROSS APPLY over INNER JOIN?
- Insert Data Into Temp Table with Query
- What is the behavior of integer division?
- Round a floating-point number down to the nearest integer?
- SQL query to get the employee name and their manager name from the same table
- syntaxerror: “unexpected character after line continuation character in python” math
- Limiting floats to two decimal points
- error, string or binary data would be truncated when trying to insert
- How to create Temp table with SELECT * INTO tempTable FROM CTE Query
- NOT IN vs NOT EXISTS
- How can I do an UPDATE statement with JOIN in SQL Server?
- Must declare the scalar variable
- syntaxerror: “unexpected character after line continuation character in python” math
- TypeError: ‘float’ object is not callable
- T-SQL split string
- Error: “expression must have integral or unscoped enum type” [duplicate]
- Must declare the scalar variable
- Rename column SQL Server 2008
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- How to round to 2 decimals with Python?
- Function to Calculate Median in SQL Server
- Efficiently convert rows to columns in sql server
- Converting double to integer in Java
- The SQL OVER() clause – when and why is it useful?
- Update multiple columns in SQL
- Nested select statement in SQL Server
- 1e-9 or -1e9, which one is correct?
- Error: all the input array dimensions except for the concatenation axis must match exactly
- syntaxerror: “unexpected character after line continuation character in python” math
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- Function to Calculate Median in SQL Server
- How do I escape a single quote in SQL Server?
- SQL Server IF EXISTS THEN 1 ELSE 2
- Round a double to 2 decimal places [duplicate]
- Round a double to 2 decimal places [duplicate]
- C++ round a double up to 2 decimal places
- T-SQL split string based on delimiter
- What is the use of GO in SQL Server Management Studio & Transact SQL?