5

I am getting error

#7890 - Can't find file 'C:UsersAdminDesktopBL postcodes.csv.zip'.

here is the script

LOAD DATA LOCAL INFILE 'C:\Users\Admin\Desktop\BL postcodes.csv.zip' 
IGNORE INTO TABLE uk_pc 
FIELDS TERMINATED BY ',' 
LINES TERMINATED BY '\n' 
(Postcode, Latitude, Longitude, Easting, Northing, GridRef, County, District, Ward, DistrictCode, WardCode, Country, CountyCode)

i have tried to change folders and change permission also but same error ... (working on localhost server)

5
  • 2
    'C:UsersAdminDesktopBL postcodes.csv.zip' path has to be wrong cuz it doesn't have traling slashes. try: INFILE 'C:\\Users\\Admin\\Desktop\\BL postcodes.csv.zip'
    – asdawrqtgf
    Commented Dec 20, 2012 at 20:10
  • @Disa Thx it worked but getting another error now data is my database get in wrong format some thing like this ** §@¼eSìï ®·ÔÙÇT Š!žfÈ3tx}ºz¹àì6¿uÏÍ¿ÑæË...** where am i getting wrong now :(
    – Harinder
    Commented Dec 20, 2012 at 20:17
  • 2
    I am not sure if you could use .zip. Try unpacking it.
    – asdawrqtgf
    Commented Dec 20, 2012 at 20:18
  • I'm pretty sure you need a regular plain-text file and compression is not supported.
    – tadman
    Commented Dec 20, 2012 at 20:20
  • @Disa Yaa great it worked ;) thx ... can u make it as ans so i can accept it and close my question .:)
    – Harinder
    Commented Dec 20, 2012 at 20:21

2 Answers 2

4

'C:UsersAdminDesktopBL postcodes.csv.zip' path has to be wrong because it doesn't have traling slashes. try: INFILE 'C:\\Users\\Admin\\Desktop\\BL postcodes.csv.zip'

And try with unpacked file.

-1

use local infile like below:

load data local infile 'C:\Users\Admin\Desktop\' into table user

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.