Reputation: 309
Hi I have a Redshift DB and am trying to insert data from the table "scans" / column "net_rate" (data type numeric) into another table "visits_by_scan" / column "scan_cost" (data type numeric). The query I am using is the below:
insert into visits_by_scan (scan_cost)
select sum(cast(s.net_rate as decimal(30,4)))
from scans s
When I try to run this query I get the following numeric overflow error message:
How to insert the data without any errors? Any help is appreciated.
Upvotes: 3
Views: 26605
Reputation: 1
According to my understanding, the error means that the type of value that you want to insert is different with the type of value in the column.
For example, you cannot inset 1.3333 into a column with only one-digit value like 1.3.
Upvotes: 0