i tried to use the statement 'SELECT...INTO OUTFILE' to export data from mysql to a text file and use 'LOAD DATA INFILE' to import data from text file to mysql. I don't have a problem with this for as long as i used the same delimiter when i do the export/import process.
Now, we have an existing database (C-ISAM on AIX 4.2, with Magic Software as the front-end) which i need to import into it the data from mysql. The problem is, the built-in export/import utility from Magic accepts only fix-width format while in contrary, i could not generate an output from the 'SELECT...INTO OUTFILE' statement WITHOUT using a delimiter! Or, is there a way for this that i didn't just discover?
Here's my plan:
1. I'll do the export from mysql using 'SELECT...INTO OUTFILE' using a comma or tab delimiter.
2. Create a utility (in PHP) that would remove the delimiters from the output file created in step1.
3. Import the edited output file from step 2 into our existing database using Magic.
sleipner, i hope you could share to me the algorithm you used or better yet, a sample code snippet in removing the delimiters.
if you have better suggestions, pls share it with me.
thanks,