Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. LOAD DATA INFILE '/home/myusername/mysql/DRAWINGS.csv' INTO TABLE DwgsTbl
  2. FIELDS TERMINATED BY '|'
  3. ENCLOSED BY '"'
  4. LINES TERMINATED BY '\n'
  5. (QuoteNo, Updated, Keyword1, Keyword2, Material, fSize, DWGNo, Description, @var1, NTS, DOT, Customer, ProjectSpec, DwgSize, Detail, GD, DrawnBy, RecNo, Notes, @var2)
  6. SET createdDate = STR_TO_DATE(@var1, '%c/%e/%Y %H:%i:%s')
  7. Revision = IF(@var2 RLIKE '^[0-9]+$', @var2,0);
  8.  
  9. THIS RETURNS THIS ERROR MESSAGE:
  10. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Revision = IF(@var2 RLIKE '^[0-9]+$', @var2,0)' at line 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement