0
Home  ›  Web

CSV To SQL

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.
Laxman Nepal
Laxman Nepal is a multi-talented individual with expertise in computer teaching, blogging, video editing, and more. With years of experience in his field, Laxman has established himself as a reliable source of knowledge and insight. He is enthusiastic about sharing his expertise with the world, and his work has been recognized by various organizations. Through his informative blog posts and engaging videos, Laxman aims to inspire and educate his readers and viewers. Join me as we explore the world of technology and education with Laxman Nepal!
Search
Menu
Theme
Share
Additional JS