My guess is that you’re trying to squeeze a number greater than 99999.99 into your decimal fields. Changing it to (8,3) isn’t going to do anything if it’s greater than 99999.999 – you need to increase the number of digits before the decimal. You can do this by increasing the precision (which is the total number of digits before and after the decimal). You can leave the scale the same unless you need to alter how many decimal places to store. Try decimal(9,2)
or decimal(10,2)
or whatever.
You can test this by commenting out the insert #temp
and see what numbers the select statement is giving you and see if they are bigger than your column can handle.
Related Posts:
- Rename column SQL Server 2008
- Efficiently convert rows to columns in sql server
- T-SQL split string based on delimiter
- How do I do multiple CASE WHEN conditions using SQL Server 2008?
- SQL Server WITH statement
- SQL Server Insert if not exists
- SQL Server: Invalid Column Name
- How do I do multiple CASE WHEN conditions using SQL Server 2008?
- 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
- Microsoft OLE DB Provider for SQL Server error ‘80004005’
- Bulk load data conversion error (truncation)
- Can I use multiple “with”?
- Backup a single table with its data from a database in sql server 2008
- How can I group by date time column without taking time into consideration
- Arithmetic overflow error converting varchar to data type numeric. ’10’ <= 9.00
- Filter data based on date in sql
- Varchar invalid for Sum operator
- Unknown column in ‘field list’ error on MySQL Update query
- The wait operation timed out. ASP
- When should I use CROSS APPLY over INNER JOIN?
- Insert Data Into Temp Table with Query
- How to create Temp table with SELECT * INTO tempTable FROM CTE Query
- SQL SELECT WHERE field contains words
- T-SQL split string
- Using group by on multiple columns
- Nested select statement in SQL Server
- What’s the difference between VARCHAR and CHAR?
- Conversion of a varchar data type to a datetime data type resulted in an out-of-range value in SQL query
- How to split the name string in mysql?
- Sql Server equivalent of a COUNTIF aggregate function
- Column name or number of supplied values does not match table definition
- How to Select Top 100 rows in Oracle?
- Simple PHP Pagination script
- CREATE VIEW must be the only statement in the batch
- SQL Server FOR EACH Loop
- ORA-12560: TNS:protocol adaptor error
- How can I select the first day of a month in SQL?
- SQL – HAVING vs. WHERE
- What’s the difference between RANK() and DENSE_RANK() functions in oracle?
- How can I delete using INNER JOIN with SQL Server?
- MySQL combine two columns into one column
- How to SUM two fields within an SQL query
- DateTime2 vs DateTime in SQL Server
- ORA-01861: literal does not match format string
- Difference between numeric, float and decimal in SQL Server
- “ORA-01438: value larger than specified precision allowed for this column” when inserting 3
- ERROR: there is no unique constraint matching given keys for referenced table “bar”
- How do I query for all dates greater than a certain date in SQL Server?
- How to concatenate text from multiple rows into a single text string in SQL Server
- Count(*) vs Count(1) – SQL Server
- Remove duplicate rows in MySQL
- I want to use CASE statement to update some records in sql server 2005
- “You tried to execute a query that does not include the specified aggregate function”
- How to write a SQL DELETE statement with a SELECT statement in the WHERE clause?
- How to round down to nearest integer in MySQL?
- How do I reset a sequence in Oracle?
- Query to convert from datetime to date mysql
- MySQL error: key specification without a key length
- SQL: Two select statements in one query
- Check if MySQL table exists without using “select from” syntax?
- mysql update column with value from another table
- what is the difference between triggers, assertions and checks (in database)
- Replacing NULL with 0 in a SQL server query
- SQL Server dynamic PIVOT query?
- How to delete from multiple tables in MySQL?
- How to copy a row and insert in same table with a autoincrement field in MySQL?
- Error converting data type varchar
- I want to use CASE statement to update some records in sql server 2005
- What does Include() do in LINQ?
- SQL Server “cannot perform an aggregate function on an expression containing an aggregate or a subquery”, but Sybase can
- Get everything after and before certain character in SQL Server
- LEFT function in Oracle
- What are database constraints?
- Postgresql column reference “id” is ambiguous
- Inner Joining three tables
- How do I view the Explain Plan in Oracle Sql developer?
- ORA-01779: cannot modify a column which maps to a non key-preserved table
- SQLite string contains other string query
- Cannot insert explicit value for identity column in table ‘table’ when IDENTITY_INSERT is set to OFF
- Sorting search results by taxonomy terms
- How to properly sanitize strings without $wpdb->prepare?
- WordPress SQL LIKE request doesn’t work for fields with special symbols
- posts_where Fails with More than One Custom Field in Query
- WordPress database error: You have an error in your SQL syntax
- Restose content from revisions – sql query
- Better way to migrate to server?
- Inner Join user tables to select users with roles
- $wpdb->prepare with LIKE returning blank array instead of rows
- Removing posts by sql
- WooCommerce database query : Get product category image path+name from thumbnail_id [closed]
- WordPress can I manually add columns in users table and display it in the default manage user plugin and registration form? [closed]
- Help me SELECT thumbnail from SQL and use
- Why is my insert row only inserting the final row from the loop into the database rather than just inserting one
- Creating a “forum” – showing last post or last commented post
- Replace Unwanted Space in Post Content URL
- SQL to transform all email addresses in my DB in lowercase [closed]
- How to write inner join using posts_clauses?
- 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