title: SQL Server bulk insert - "Bulk load data conversion error"
body: <pre><code>bulk insert dbo.A
  FROM 'd:\AData.csv'
  WITH 
  (
  FIELDTERMINATOR = ',',
  ROWTERMINATOR = '\n'
  )
  </code></pre>
  
  <p>Inserting bulk data into a database, I approached an unexplainable error after review of the suspect data:</p>
  
  <blockquote>
    <p><em>Msg 4867, Level 16, State 1, Line 6</em><br>
    <em>Bulk load data conversion error (overflow) for row 1, column 42 (FES).</em></p>
  </blockquote>
  
  <p>Column FES was <code>tinyint</code>, now <code>smallint</code>. <code>d:\AData.csv</code> contains a <code>2</code> in row 1, column 42. Are there any other sources for this type of error?</p>
  
  <p>---APPEND---</p>
  
  <p>I'm not sure how to properly post this. </p>
  
  <p>Create Table Script </p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Headers row </p>
  
  <blockquote>
    <p>serialno,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,SINK,SMP,STOV,TEL,TEN,TOIL,VACS,VALP,VEH,WATP,YBL,FES,FINCP,FPARC,GRNTP,GRPIP,HHL,HHT,HINCP,HUGCL,HUPAC,HUPAOC,HUPARC,KIT,LNGI,MULTG,MV,NOC,NPF,NPP,NR,NRC,OCPIP,PARTNER,PLM,PSF,R18,R60,R65,RESMODE,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</p>
  </blockquote>
  
  <p>Row 1</p>
  
  <blockquote>
    <p>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,00020,00014,00035,00037,00046,00047,00048,00080,00034,00012,00061,00031,00069,00043,00060,00011,00050,00016,00057,00050,00013,00016,00068,00056,00039,00042,00049,00081,00041,00012,00092,00050,00055,00049,00016,00062,00041,00103,00012,00048,00060,00073,00052,00063,00038,00047,00040,00017,00040,00059,00020,00042,00010,00038,00018</p>
  </blockquote>
  
  <p><a href="http://www.census.gov/acs/www/Downloads/data_documentation/pums/DataDict/PUMS_Data_Dictionary_2008-2010.pdf" rel="nofollow">Link to ACS 2008-2010 Data Dictionary</a></p>