Forum Moderators: coopster
Can some one look at this please then answer the following 5 questions.
'orderID','CountyLocation','Postcode','MakeofCar','ModelofCar', 'Trim','Price','RegYear','RegLetter','Mileage','BodyStyle', 'Transmission','FuelType','VehicleCC','Colour','NoDoors', 'CarDescription','ImageLink','ContactName','PhoneNumber', 'EmailAddress'
i would like to know.............
Fields terminated by == what should i put here?
Fields enclosed by == what should i put here?
Fields escaped by == what should i put here?
Lines terminated by == what should i put here?
Column names == what should i put here?
If someone could tell me that please because what i have been using is just not working fullstop i would be most grateful you couldnt even understand
Thanks so much for anyone that can help
Best regards
Adam
[edited by: jatar_k at 9:14 pm (utc) on Feb. 15, 2005]
[edit reason] fixed sidescroll [/edit]
I've no more ideas, I only learned enough to get this far.
Karl
Just a thought, but I've just checked my database and all the values for INT are set at 11, No idea if its relevant or not.
I had a similar problem before and it was due to the fact that I had INT set as TINYINT, it would only accept a couple of hundred when I was trying to add 1000's
Still havin' problems eh? I've got a couple more thoughts.
1) Maybe there's something wrong with the csv file. Open it up in Notepad and see if everything looks OK. Check the line where it's stopping and see if anything looks weird or maybe it's missing a comma.
2) If there's all ready rows in the database that have a unique id or autoincrement then I don't think LOADDATA will overwrite them automatically. You have to select Replace to update existing records.
Tim
Bascially, you need to look at your Columns and the data within. Above you are defining the type of Field and it's Character Limitations. If everything is INT it is an Integer and won't accept Alpha Characters when you have letters...and if the length, the number, is not long enough, it will error out.
Not everyone of the stipulations needs to be met when looking below like Fields end with or terminated by. If you have a csv...I would suggest you use that as it is preformatted and works great. If you have a *.txt file open it with Excel and save it as a *.csv.
Next tell it that they are terminated with a comma, because a *.csv is saved as a "comma separated" file. If you have any comma's in the names or any rows, I would suggest you replace them with "_" or + or some other sign other than the "," as when it uploads you will notice weird line breaks and data.
Hope it helps. :)