This conversion is now available as an API at ConvertCsv.io
What can this tool do?
INSERT, UPDATE, DELETE, MERGE, and SELECT statements can be created.
CREATE TABLE, DROP TABLE, CREATE VIEW, DROP VIEW are optional.
The key used in UPDATE, DELETE, and MERGE is specified by setting the key column.
Now it is easy to merge csv into a database table by using the new Generate MERGE feature.
A field value may be trimmed, made uppercase, or lowercase. You can add custom text around the field value by
using the template feature.
For example, if you are using Oracle and want to convert a field in YYYYMMDD format to DATE, use TO_DATE({f},'YYYYMMDD').
Likewise for Sql Server, use CAST({f} AS DATETIME).
The field value will be substituted for {f}.
Current version supports some database specific output and support ORACLE, MYSQL, SQL SERVER, PostreSQL and ANSI SQL databases.
There are slight variations in the way different databases handle NULLs, empty strings, DATES, etc. .
What are my options?
You can specify which fields to include and specify the name of the field.
You can choose to quote your column names as appropriate for your database engine.