SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Error 1064 (42000)

    Could someone tell me what is wrong with this script...

    LOAD DATA LOCAL INFILE Book1.csv
    INTO TABLE page
    FIELDS TERMINATED BY ','
    LINES TERMINATED BY ' '
    (id, caption)

    I am trying to upload book1.csv into the database 'page'
    It only has two fields currently, 'id and 'caption' and whenever I try to run it, I get the error 1064 (42000) near 'Book1.csv INTO TABLE page FIELDS TERMINATED BY ',' LINES TERMINATED BY ' ' (id,".

    Anyone know why?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    put the file name in quotes
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THanks, I appreciate the quick reply...it's fixed


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •