Forum Moderators: coopster
I often import data into the database using the admin area with text files etc.
I now need to export all my data from mysql into excel, which could then be put into any other database offline.
I have tried running
SELECT a,b INTO OUTFILE "/tmp/result.text"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
FROM test_table;
But can't locate the final output file on the server so I tried to make it output on my computer using C:/my_documents/ etc but still nothing, the admin says success but no file any where.
Their is an option in my admin thats says display all data for excel terminate feild using , or ; but when I copy and paste the results into a text file then try to import into excel even after correcting the dilimators it ends up in wrong columns etc.
How can I download all my mysql data in a nice format with the field headers and import into excel with the feild headers?
Any help would be really appreciated.
Cheers
ok problem solved.
In my ever hard way of learning the data is bad.
I have too many blank return spaces and also i beleive these <br> are not good so i replace with <#>
This is one lesson i have learn't the hard way clean data is a must.
I now have to look at the best ways of cleaning everything before I put it into the database.