MySQL Forums
Forum List  »  Newbie

mysqlimport??
Posted by: Rick PIller
Date: July 12, 2005 08:28AM

I want to be able to run a batch file that imports a csv file to a mysql table. This seems like a perfect job for mysqlimport, but I have some questions first.

Here is what a typical line looks like:
00002,7/6/2005,7:37:15 AM,me@me.com,55337

My first issue is the date and time. I want these to be converted to mysql date and time format. Is there a way to do this directly with a mysql command?


Second issue is that I want to run mysqlimport on a machine that doesn't have mysql. It will connect to a machine that does. It seems that mysqlimport only comes if you install mysql, which I don't want to do on the client machine.


Third issue is that actual command. I want to be able to pipe out the output to a file. So overall the command would be import this csv file to this table, converting dates and times, and output the result to a text file.

Could anyone help with this? Thanks.

Options: ReplyQuote


Subject
Written By
Posted
mysqlimport??
July 12, 2005 08:28AM
July 12, 2005 08:46AM
July 12, 2005 09:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.