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.

About the Author

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 enthusiast…
  • A-
  • A+

© SuperTools. All rights reserved.

Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.