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
- 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
- Case in Select Statement
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- Inserting multiple rows in a single SQL query? [duplicate]
- Self Join to get employee manager name
- How do I UPDATE from a SELECT in SQL Server?
- What do these operators mean (** , ^ , %, //)? [closed]
- Round a floating-point number down to the nearest integer?
- How can I do an UPDATE statement with JOIN in SQL Server?
- How to round to 2 decimals with Python?
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- What is the use of GO in SQL Server Management Studio & Transact SQL?
- How do order of operations go on Python?
- Round a double to 2 decimal places
- Drop a temporary table if it exists
- IDENTITY_INSERT is set to OFF – How to turn it ON?
- An attempt was made to access a socket in a way forbidden by its access permissions
- Each GROUP BY expression must contain at least one column that is not an outer reference
- Update statement to update multiple rows
- How can I convert radians to degrees with Python?
- Why does NULL = NULL evaluate to false in SQL server
- Cannot Connect to Server – A network-related or instance-specific error
- Best way to do nested case statement logic in SQL Server
- How can I clone an SQL Server database on the same server in SQL Server 2008 Express?
- Get day of week in SQL Server 2005/2008
- Overflow / math range error for log or exp
- incorrect syntax error CREATE VIEW must be the only statement in the batch
- Attach (open) mdf file database with SQL Server Management Studio
- How can I truncate a datetime in SQL Server?
- Always Round UP a Double
- Why use a READ UNCOMMITTED isolation level?
- How can I check for NaN values?
- How to group by month from Date field using sql
- Is there a combination of “LIKE” and “IN” in SQL?
- How to parse XML data in SQL server table
- How to convert SQL Server’s timestamp column to datetime format
- What is the Oracle equivalent of SQL Server’s IsNull() function?
- Cannot open database “test” requested by the login. The login failed. Login failed for user ‘xyz\ASPNET’
- SQL Server Installation – What is the Installation Media Folder?
- Determine ROW that caused “unexpected end of file” error in BULK INSERT?
- SQL-Server: The backup set holds a backup of a database other than the existing
- Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (Year)
- Conversion of a datetime2 data type to a datetime data type results out-of-range value
- How do I fix the multiple-step OLE DB operation errors in SSIS?
- SQL “select where not in subquery” returns no results
- ListAGG in SQLSERVER
- Best way to represent a fraction in Java?
- Format number as percent in MS SQL Server
- ‘CREATE PROCEDURE’ must be the only statement in the batch (Erro)
- Errors: “INSERT EXEC statement cannot be nested.” and “Cannot use the ROLLBACK statement within an INSERT-EXEC statement.” How to solve this?
- Convert double to Int, rounded down
- How to calculate an angle from three points?
- Is there a standard sign function (signum, sgn) in C/C++?
- How to calculate age (in years) based on Date of Birth and getDate()
- Solutions for INSERT OR UPDATE on SQL Server
- Text was truncated or one or more characters had no match in the target code page including the primary key in an unpivot
- How can I group by date time column without taking time into consideration
- SHOWPLAN permission denied in database ‘tempdb’. in sql server 2008
- How to determine if a point is in a 2D triangle?
- Append table to an existing one: SQL Server
- SQL Server – An expression of non-boolean type specified in a context where a condition is expected, near ‘RETURN’
- Update query using Subquery in Sql Server
- Using Excel VBA to run SQL query
- An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON SQL Server
- Pad a string with leading zeros so it’s 3 characters long in SQL Server 2008
- How to connect to database from Unity