This generates an Arithmetic Overflow because it is trying to implicitly cast the Val
column to a NUMERIC(3,2), which naturally will overflow on a 2-digit value like 10.
It’s using NUMERIC(3,2) as the target type and size because that is the smallest numeric that 9.00
appears to fit into.
The solution, of course, is to use explict CASTing instead of doing it implicitly
Related Posts:
- T-SQL split string based on delimiter
- Can I use multiple “with”?
- How can I group by date time column without taking time into consideration
- Varchar invalid for Sum operator
- Selecting COUNT(*) with DISTINCT
- What is a stored procedure?
- Self Join to get employee manager name
- How do I UPDATE from a SELECT in SQL Server?
- SQL query to select dates between two dates
- When should I use CROSS APPLY over INNER JOIN?
- How can I do an UPDATE statement with JOIN in SQL Server?
- T-SQL split string
- Rename column SQL Server 2008
- Efficiently convert rows to columns in sql server
- SQL Query with NOT LIKE IN
- How do I escape a single quote in SQL Server?
- How do I escape a single quote in SQL Server?
- IDENTITY_INSERT is set to OFF – How to turn it ON?
- Column name or number of supplied values does not match table definition
- How do I do multiple CASE WHEN conditions using SQL Server 2008?
- SQL Server FOR EACH Loop
- SQL Server WITH statement
- DateTime2 vs DateTime in SQL Server
- SQL Server Insert if not exists
- SQL Server: Invalid Column Name
- How can I get column names from a table in SQL Server?
- How do I do multiple CASE WHEN conditions using SQL Server 2008?
- How to parse XML data in SQL server table
- What is the equivalent of ‘describe table’ in SQL Server?
- Error converting data type varchar to float
- Arithmetic overflow error converting numeric to data type numeric
- I want to use CASE statement to update some records in sql server 2005
- Determine ROW that caused “unexpected end of file” error in BULK INSERT?
- Determine ROW that caused “unexpected end of file” error in BULK INSERT?
- Sql query to insert datetime in SQL Server
- Conversion failed when converting the varchar value ‘simple, ‘ to data type int
- SELECT DISTINCT on one column
- Exclude a column using SELECT * [except columnA] FROM tableA?
- Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (Year)
- TSQL PIVOT MULTIPLE COLUMNS
- Microsoft OLE DB Provider for SQL Server error ‘80004005’
- Bulk load data conversion error (truncation)
- SQL “select where not in subquery” returns no results
- Equivalent of Oracle’s RowID in SQL Server
- Get current year in TSQL
- Is it possible to specify condition in Count()?
- SQL Server dynamic PIVOT query?
- Backup a single table with its data from a database in sql server 2008
- Error converting data type varchar
- Temporary table in SQL server causing ‘ There is already an object named’ error
- I want to use CASE statement to update some records in sql server 2005
- How to calculate age (in years) based on Date of Birth and getDate()
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- Text was truncated or one or more characters had no match in the target code page including the primary key in an unpivot
- “select * into table” Will it work for inserting data into existing table
- SUM OVER PARTITION BY
- Filter data based on date in sql
- Update query using Subquery in Sql Server
- Unknown column in ‘field list’ error on MySQL Update query
- SQL Inner-join with 3 tables?
- MySQL create table if not exists and insert record only if table was created
- ORA-00907: missing right parenthesis
- Case statement in MySQL
- How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
- Teradata: how to convert varchar value (format ‘dd.mm.yyyy’) to date (format ‘yyyy-mm-dd’ )?
- How Stuff and ‘For Xml Path’ work in SQL Server?
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
- Oracle SELECT TOP 10 records
- must appear in the GROUP BY clause or be used in an aggregate function
- How can I return pivot table output in MySQL?
- The multi-part identifier could not be bound
- MySQL syntax for Join Update
- SQLite – UPSERT *not* INSERT or REPLACE
- how to drop partition without dropping data in MySQL?
- Conversion of a varchar data type to a datetime data type resulted in an out-of-range value in SQL query
- Simple way to calculate median with MySQL
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
- Error 1046 No database Selected, how to resolve?
- What is it exactly a BLOB in a DBMS context
- Oracle SQL: Update a table with data from another table
- How to SUM and SUBTRACT using SQL?
- What represents a double in sql server?
- MySQL – UPDATE multiple rows with different values in one query
- How to create a MySQL hierarchical recursive query?
- Subtract one day from datetime
- updating table rows in postgres using subquery
- MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET
- Is there a coalesce-like function in Excel?
- How do I count unique items in field in Access query?
- How to select the last record of a table in SQL?
- Sqlite: CURRENT_TIMESTAMP is in GMT, not the timezone of the machine
- What is a postgres superuser
- “This SqlTransaction has completed; it is no longer usable.”… configuration error?
- WP Optimization: Removing Orphaned wp_options (especially the autoload ones)
- Auto-update tables from database
- dbDelta not creating table (yes, once more)
- How to export 2 week’s worth of posts
- SQL – JOIN last child
- wpdb prepare without placeholder
- This SQL request call all time and overload my server : SELECT meta_value FROM wp_sitemeta WHERE meta_key = ‘wp_installer_network’ AND site_id = 1