bulk insert dbo.A
FROM 'd:\AData.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
大量のデータをデータベースに挿入すると、疑わしいデータを確認した後、説明のつかないエラーが発生しました。
メッセージ 4867、レベル 16、状態 1、行 6
行 1、列 42 (FES) の一括読み込みデータ変換エラー (オーバーフロー)。
コラムFESだったtinyint
、今smallint
。d:\AData.csv
行 1、列 42に a が含まれてい2
ます。このタイプのエラーの原因は他にありますか?
---追記---
これを適切に投稿する方法がわかりません。
テーブル スクリプトの作成
create table AcsBy320082010Hus(
serialnoId bigint,
RT char,
DIVISION tinyint,
PUMA int,
REGION tinyint,
ST tinyint,
ADJHSG int,
ADJINC int,
WGTP int,
NP tinyint,
TYPE tinyint,
ACR tinyint,
AGS tinyint,
BDS tinyint,
BLD tinyint,
BUS tinyint,
CONP smallint,
ELEP smallint,
FS smallint,
FULP int,
GASP int,
HFL tinyint,
INSP varchar(6),
KIT tinyint,
MHP int,
MRGI tinyint,
MRGP int,
MRGT tinyint,
MRGX tinyint,
PLM tinyint,
RMS tinyint,
RNTM tinyint,
RNTP int,
SMP int,
TEL tinyint,
TEN tinyint,
VACS tinyint,
VAL tinyint,
VEH tinyint,
WATP int,
YBL tinyint,
FES tinyint,
FINCP int,
FPARC tinyint,
GRNTP int,
GRPIP tinyint,
HHL tinyint,
HHT tinyint,
HINCP int,
HUGCL bit,
HUPAC tinyint,
HUPAOC tinyint,
HUPARC tinyint,
LNGI tinyint,
MV tinyint,
NOC tinyint,
NPF tinyint,
NPP bit,
NR bit,
NRC tinyint,
OCPIP tinyint,
PARTNER tinyint,
PSF bit,
R18 bit,
R60 tinyint,
R65 tinyint,
RESMODE tinyint,
SMOCP int,
SMX tinyint,
SRNT bit,
SVAL bit,
TAXP tinyint,
WIF tinyint,
WKEXREL tinyint,
WORKSTAT tinyint,
FACRP bit,
FAGSP bit,
FBDSP bit,
FBLDP bit,
FBUSP bit,
FCONP bit,
FELEP bit,
FFSP bit,
FFULP bit,
FGASP bit,
FHFLP bit,
FINSP bit,
FKITP bit,
FMHP bit,
FMRGIP bit,
FMRGP bit,
FMRGTP bit,
FMRGXP bit,
FMVYP bit,
FPLMP bit,
FRMSP bit,
FRNTMP bit,
FRNTP bit,
FSMP bit,
FSMXHP bit,
FSMXSP bit,
FTAXP bit,
FTELP bit,
FTENP bit,
FVACSP bit,
FVALP bit,
FVEHP bit,
FWATP bit,
FYBLP bit,
WGTP1 int,
WGTP2 int,
WGTP3 int,
WGTP4 int,
WGTP5 int,
WGTP6 int,
WGTP7 int,
WGTP8 int,
WGTP9 int,
WGTP10 int,
WGTP11 int,
WGTP12 int,
WGTP13 int,
WGTP14 int,
WGTP15 int,
WGTP16 int,
WGTP17 int,
WGTP18 int,
WGTP19 int,
WGTP20 int,
WGTP21 int,
WGTP22 int,
WGTP23 int,
WGTP24 int,
WGTP25 int,
WGTP26 int,
WGTP27 int,
WGTP28 int,
WGTP29 int,
WGTP30 int,
WGTP31 int,
WGTP32 int,
WGTP33 int,
WGTP34 int,
WGTP35 int,
WGTP36 int,
WGTP37 int,
WGTP38 int,
WGTP39 int,
WGTP40 int,
WGTP41 int,
WGTP42 int,
WGTP43 int,
WGTP44 int,
WGTP45 int,
WGTP46 int,
WGTP47 int,
WGTP48 int,
WGTP49 int,
WGTP50 int,
WGTP51 int,
WGTP52 int,
WGTP53 int,
WGTP54 int,
WGTP55 int,
WGTP56 int,
WGTP57 int,
WGTP58 int,
WGTP59 int,
WGTP60 int,
WGTP61 int,
WGTP62 int,
WGTP63 int,
WGTP64 int,
WGTP65 int,
WGTP66 int,
WGTP67 int,
WGTP68 int,
WGTP69 int,
WGTP70 int,
WGTP71 int,
WGTP72 int,
WGTP73 int,
WGTP74 int,
WGTP75 int,
WGTP76 int,
WGTP77 int,
WGTP78 int,
WGTP79 int,
WGTP80 int)
ヘッダー行
シリアル番号、RT、DIVISION、PUMA、REGION、ST、ADJHSG、ADJINC、WGTP、NP、TYPE、ACR、AGS、BATH、BDSP、BLD、BUS、CONP、ELEP、FS、FULP、GASP、HFL、INSP、MHP、 MRGI、MRGP、MRGT、MRGX、REFR、RMSP、RNTM、RNTP、RWAT、シンク、SMP、STOV、TEL、TEN、TOIL、VACS、VALP、VEH、WATP、YBL、FES、FINCP、FPARC、GRNTP、GRPIP、 HHL、HHT、HINCP、HUGCL、HUPAC、HUPAOC、HUPARC、キット、LNGI、MULTG、MV、NOC、NPF、NPP、NR、NRC、OCPIP、パートナー、PLM、PSF、R18、R60、R65、レスモード、SMOCP、 SMX、SRNT、SVAL、TAXP、WIF、WKEXREL、WORKSTAT、FACRP、FAGSP、FBATHP、FBDSP、FBLDP、FBUSP、FCONP、FELEP、FFSP、FFULP、FGASP、FHFLP、FINSP、FKITP、FMHP、FMRGIP、FMRGP、FMRGTP、 FMRGXP、FMVP、FPLMP、FREFRP、FRMSP、FRNTMP、FRNTP、FRWATP、FSINKP、FSMP、FSMXHP、FSMXSP、FSTOVP、FTAXP、FTELP、FTENP、FTOILP、FVACSP、FVALP、FVEHP、FWATP、FYBLP、WGTP1、WGTP2、WGTP3、 WGTP4、WGTP5、WGTP6、WGTP7、WGTP8、WGTP9、WGTP10、WGTP11、WGTP12、WGTP13、WGTP14、WGTP15、WGTP16、WGTP17、WGTP18、WGTP19、WGTP20、WGTP21、WGTP22、WGTP23、WGTP24、WGTP25、WGTP26、WGTP27、WGTP28、 WGTP29、WGTP30、WGTP31、WGTP32、WGTP33、WGTP34、WGTP35、WGTP36、WGTP37、WGTP38、WGTP39、WGTP40、WGTP41、WGTP42、WGTP43、WGTP44、WGTP45、WGTP46、WGTP47、WGTP48、WGTP49、WGTP50、WGTP51、WGTP52、WGTP53、WGTP54、 WGTP55、WGTP56、WGTP57、WGTP58、WGTP59、WGTP60、WGTP61、WGTP62、WGTP63、WGTP64、WGTP65、WGTP66、WGTP67、WGTP68、WGTP69、WGTP70、WGTP71、WGTP72、WGTP73、WGTP74、WGTP75、WGTP76、WGTP77、WGTP78、WGTP79、 WGTP80
行 1
2008000000023,H,6,01300,3,01,1012650,1031272,00043,04,1,1,,1,02,02,2,0000,150,2,0002,020,3,00150,,2, 00980,1,1,1,03,,,1,1,,1,1,1,1,,0210000,2,0080,09,2,000058100,2,,,4,1,000058100,0, 3,3,3,1,1,1,3,02,04,0,0,02,024,0,1,0,1,0,0,1,01170,3,0,1,19,1, 3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,00112,00045,00068,00017,00044,00091,00071,00032, 00036,00042,00048,00041,00013,00031,00063,00013,00037,00017,00063,00098,00026,00036,00017,00065,00036,000,000,00014,00035,00037,00046,00047,00048,00080、 00034,00012,00061,00031,00069,00043,00060,00011,00050,000,00016,00057,000,00013,00016,00068,00056,00039,00042,00049,00081,00041,00012,00092,000,0005050555、 00049,00016,00062,00041,00103,00012,00048,00060,00073,00052,00063,00038,00047,00040,00017,00040,00059,00020,00042,00010,00018,00038