Guest User

Untitled

a guest
Jan 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. create table Pickup
  2. (
  3. PickupID int not null,
  4. ClientID int not null,
  5. PickupDate date not null,
  6. PickupProxy varchar (40) ,
  7. PickupHispanic bit default 0,
  8. EthnCode varchar(2),
  9. CategCode varchar (2) not null,
  10. AgencyID int(3) not null,
  11.  
  12. Primary Key (PickupID),
  13. FOREIGN KEY (CategCode) REFERENCES Category(CategCode),
  14. FOREIGN KEY (AgencyID) REFERENCES Agency(AgencyID),
  15. FOREIGN KEY (ClientID) REFERENCES Clients (ClientID),
  16. FOREIGN KEY (EthnCode) REFERENCES Ethnicity (EthnCode)
  17. );
  18.  
  19. sample data from my txt file
  20. 1065535,7709,1/1/2006,,0,,SR,6
  21. 1065536,7198,1/1/2006,,0,,SR,7
  22. 1065537,11641,1/1/2006,,0,W,SR,24
  23. 1065538,9805,1/1/2006,,0,N,SR,17
  24. 1065539,7709,2/1/2006,,0,,SR,6
  25. 1065540,7198,2/1/2006,,0,,SR,7
  26. 1065541,11641,2/1/2006,,0,W,SR,24
  27.  
  28. LOAD DATA INFILE 'Pickup_withoutproxy2.txt' INTO TABLE pickup;
  29.  
  30. FIELDS SPECIFIED BY ','
Add Comment
Please, Sign In to add comment