MySQL Forums
Forum List  »  Newbie

Re: using excel dummy data to populate Mysql database tables
Posted by: Phillip Ward
Date: October 25, 2010 07:58AM

If we're only talking about a one-off load (which you inevitably wind up using more than once), use Excel to create the necessary Insert statements. Use the Concatenate function to build up the necessary SQL from your data cells and some other bits of SQL, cut and paste these into a text file and then "load" the file into MySQL using the source command (or equivalent).
Remember to watch out for "line-end" conversions if your MySQL installation is on a Unix machine.

Your formulae would start off something like this:

=Concatenate("insert into vertrag values ('", dateCell, "',", numberCell, ..., ")")

Regards,
Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: using excel dummy data to populate Mysql database tables
October 25, 2010 07:58AM


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.