Syndicate

Convert online CSV to SQL query Print E-mail
Written by Stanislav Duben   
Friday, 20 July 2007
Sample ImageHere is simple online convertor from CSV to SQL. You just insert CSV data to text area and table name. Script will generate SQL insert query for all records from CSV.

Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 

Comments  

 
0 #6 Stanislav Duben 2009-08-05 11:37
Vinay: Sorry for stupid issue, I moved server and didn't turn on register globals in PHP. Script is now working. Thanks for feedback and sorry for long time to fix it.
Quote
 
 
0 #5 Vinay 2009-02-02 15:24
This is a Great Tool and I have used it in the past and it has worked well for me.

In the recent past ( last few days), when I have tried it, returns empty Inserts :
INSERT INTO [Weights] () VALUES ();

Here is one of the Rows I was trying to create Inserts for

d_MeasurementDa te,i_DayNum ,f_Weight
5/14/2008,13,53.71
5/19/2008,18,54.15

Any ideas on what could be Wrong

Thanks
Vinay
Quote
 
 
0 #4 Stanislav Duben 2008-04-23 16:52
Hi phil, can you give me few rows of CSV Data and specify if you are generating code for MySQL or MSSQL? I will take a look where is problem and fix script.
Quote
 
 
0 #3 phil 2008-04-23 16:45
Hi, thanks for the script. I have a problem, however, because the script is not enclosing the data to be inserted in single quotes as shown below:

VALUES ('16,16,category,,0,18');
Quote
 
 
0 #2 Stanislav Duben 2008-04-23 15:09
Hi Jeff,
you are right, this is really simple script to convert CSV without column names in first row. I will modify it in future to get better results. Thanks for you note.
Quote
 
 
0 #1 Jeff 2008-04-23 14:52
Your instructions fail to mention that the first row of the CSV should be the field names for each of the fields.
Quote
 

Add comment


Security code
Refresh