I have table in mysql table
table looks like
create table Pickup
(
PickupID int not null,
ClientID int not null,
PickupDate date not null,
PickupProxy varchar (40) ,
PickupHispanic bit default 0,
EthnCode varchar(2),
CategCode varchar (2) not null,
AgencyID int(3) not null,
Primary Key (PickupID),
FOREIGN KEY (CategCode) REFERENCES Category(CategCode),
FOREIGN KEY (AgencyID) REFERENCES Agency(AgencyID),
FOREIGN KEY (ClientID) REFERENCES Clients (ClientID),
FOREIGN KEY (EthnCode) REFERENCES Ethnicity (EthnCode)
);
sample data from my txt file
1065535,7709,1/1/2006,,0,,SR,6
1065536,7198,1/1/2006,,0,,SR,7
1065537,11641,1/1/2006,,0,W,SR,24
1065538,9805,1/1/2006,,0,N,SR,17
1065539,7709,2/1/2006,,0,,SR,6
1065540,7198,2/1/2006,,0,,SR,7
1065541,11641,2/1/2006,,0,W,SR,24
when I am trying to submit it by using
LOAD DATA INFILE 'Pickup_withoutproxy2.txt' INTO TABLE pickup;
it throws error
Error Code: 1265. Data truncated for column 'PickupID' at row 1
I am using MySQL 5.2
See Question&Answers more detail:
os