CSV To SQL Converter


Separator

Input

Convert

Output



Instruction

This converter converts .csv files with “,” or “;” -separator to a part of SQL query next format:

(column1, column2, ..., columnk) VALUES
(value1, value2, ..., valuek),
(value1, value2, ..., valuek),
(value1, value2, ..., valuek),
...
So input data should have next format:
column1,column2,...,columnk
value1,value2,...,valuek
value1,value2,...,valuek
value1,value2,...,valuek
...
or:
column1;column2;...;columnk
value1;value2;...;valuek
value1;value2;...;valuek
value1;value2;...;valuek
...
The main advantage of this script is that it gives you ready sql query part to load it to db. It is simple:
"INSERT INTO table" + csv_to_sql(input, separator)
Also this script can convert values, which are contains “,”.
To add this feature to your project simply copy csv_to_sql function from JS block.

Rate this Tool

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.