Hi, I'm having trouble using Bulk Insert to import data from a .txt file into a table in Microsoft SQL Server. Table Structure:CREATE TABLE Member(MemberID BigInt Identity(10001,1) Primary Key Not Null,Fname Char(20) Not Null,Lname Char(20) Not Null,DOB Datetime Not Null,Street Char(30) Not Null,Suburb Char(20) Not Null,State Char(3) Not Null,Pcode Char(4) Not Null,Phone Char(12),Mobile Char(11),DLicNo Char(6 ),JoinDate Datetime Not Null,AccBalance Dec(6,2) Not Null,ValidMember Int Not Null,Passwd Char(6 ) Not Null,Constraint CC_ValidMember CHECK (ValidMember IN ('0', '1', '2')))GO
These are the first few rows from the .txt file:"MemberID","Fname","Lname","DOB","Street","Suburb","State","Pcode","Phone","Mobile","DLicNo","JoinDate","AccBalance","ValidMember","Passwd"100001,"John","News",7/6/1970 0:00:00,"123 Oak St.","Sydney","NSW",2000,"(02)97451165","0413-111111","91231C",1/5/1997 0:00:00,0,1,"aaaaaa"100002,"David","Senior",8/1/1940 0:00:00,"18 Belmorw St.","Bankstown","NSW",2115,"(02)97411325",,"45231C",1/5/1997 0:00:00,0,1,"aaaaab"100003,"Ann","Parsons",12/3/1981 0:00:00,"24 Surf St.","Manly","NSW",2095,"(02)99415356",,"57129C",14/6/1997 0:00:00,0,1,"penguin"
This is my Script:USE MegavideosGOBULK INSERT Megavideos.dbo.MemberFROM 'C:\Database\Member.txt'With(firstrow = 2,fieldterminator = ',')
These are the last few lines of the error messages I'm getting:Server: Msg 4863, Level 16, State 1, Line 1Bulk insert data conversion error (truncation) for row 12, column 7 (State).Server: Msg 4865, Level 16, State 1, Line 1Could not bulk insert because the maximum number of errors (10) was exceeded.Server: Msg 7399, Level 16, State 1, Line 1OLE DB provider 'STREAM' reported an error. The provider did not give any information about the error.The statement has been terminated.
The problem seems to be with column 7 (State) but I'm not sure what the probem is. Any help would be appreciated.Thanks