Converting csv to sql
When you have a file created in Excel or Access and you want to convert this into a sql file, it can be a headache getting from A to B. As far as I know, this is not a straightforward “click and convert” process, but one that you have to put some thought into.
If you’re an expert coder, you can write a script in PHP that will do the job for you, but if you’re not, you may not be able to accomplish this with much ease. I have tried a few converting programs that claim to do the job but I always end up having to open my sql file afterwards and do edits to make it do what I wanted it to do.
The one way to do it that will guarantee that you end up with a sql file that does exactly what you want it to do the way you want it to do it is to create the sql file yourself. There is a step by step tutorial at The Coding Pad that walks you through the process of converting a csv file to sql. It’s a four part tutorial, and instead of posting a link to each post separately, I will point you to the summary (From csv to sql - in brief) from where you can find the links to the four individual parts.
I have used this process myself many times and it’s never failed. You do need to have an idea how to interact with your server, but the explanation is pretty straightforward.
If you have any comments, or know any programs that work really well, please leave a comment here so that I can check it out. And if you have any questions I’ll be happy to answer them.