| Author |
Topic |
|
mdhingra01
Posting Yak Master
179 Posts |
Posted - 2005-05-25 : 10:37:09
|
| I am trying to do an insert into a table and get the following error:Arithematic overflow error converting numeric to data type numeric.Here is the insert statement:INSERT INTO FILES_DIM(Det_coll, [File_Num], Unit_coll, File_Last_Upd_DT, ORI, File_Opn_DT, Jurisdiction_Cltr, File_Rst_Lvl, Diary_File_DT, Ocrc_Start_DT, Ocrc_Start_TM, Ocrc_End_DT, Ocrc_End_TM, Pirs_Xtrc_DT, File_Count, HRMIS, Member_Last_Nm, System_cd, System_NM_EN, System_NM_FR, Location_Desc, Details)SELECT DISTINCT Det_coll, [File], Unit_coll, Date_updated, ORI,Date_Open, Jur_coll, Restriction, Diary_date, Date_occured_from, Time_occured_from, Date_occured_to, Time_occured_to, Extract_date, [COUNT],left(Member_out,5), right(Member_out,21), '1','PIRS','PIRS',Location, DetailsFROM Extracts..PIRS |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-05-25 : 11:00:04
|
| One (or more) records has a value in a column which exceeds the permitted size of a column.....possibly a mismatch between columns sizes....ie bigint being inserted into int....or varchar being saved into integer....with an implicit conversion that won't work.You'll have to visually inspect the data, or load up the data in segments....ie top 100 records (not already loaded, etc)....to find the problem area. |
 |
|
|
mdhingra01
Posting Yak Master
179 Posts |
Posted - 2005-05-25 : 11:18:48
|
| I found what the problem was. It was having to do with a data type. When I create my Fiels_dim tables I set File_num data type to be int, the default is (18,0) NUll. I changed this to be (9,0) becuase no data in the file_num column is longer than 9. That caused the problem. Not sure why, I need to have (18,0) when I only need (9,0).Thanks |
 |
|
|
|
|
|