csv2sql

Index Home MAE > MAE Architecture > MAE Utilities > csv2sql

Convert CSV to SQL.

Synopsis

csv2sql [-update] [-insert] [-o outputfile] tablename [csvfilename]

Description

Convert a CSV file into SQL statements - either INSERT or UPDATE statements - for the named table.

Options

Option

Description

-update

Output SQL statements will be formulated as UPDATE statements.

-insert

Output SQL statements will be formulated as INSERT statements. This is the default.

-o outputfile

Specify outputfile as the place to put the output. The default is to output to stdout.

tableName

Specify the output file, e.g. filename.sql. The default is to output to stdout.

csvfilename

Specify the CSV input file.  By default, CSV input comes from stdin.