2003-01-05 22:57:50 +08:00
NAME
mdb-export - Export data in an MDB database table to CSV format.
2011-08-29 07:53:29 +08:00
2003-01-05 22:57:50 +08:00
SYNOPSIS
2020-10-25 18:24:28 +08:00
mdb-export [--no-header] [--delimiter delim] [--row-delimiter delim] [[--no-quote] | [--quote char [--escape char]]] [--date-format fmt] [--datetime-format fmt] [--bin strip|raw|octal|hex] [--boolean-words] database table
2020-10-25 18:34:53 +08:00
mdb-export --insert backend [--namespace prefix] [--batch-size int] database table
2014-12-29 20:10:01 +08:00
mdb-export -h|--help
2003-01-05 22:57:50 +08:00
DESCRIPTION
mdb-export is a utility program distributed with MDB Tools.
It produces a CSV (comma separated value) output for the given table. Such output is suitable for importation into databases or spreadsheets.
2020-10-25 18:24:28 +08:00
Used with --insert, it outputs SQL specific to backend dialect, including some constraints like NOT NULL and foreign keys.
2003-01-05 22:57:50 +08:00
OPTIONS
2020-09-02 21:53:50 +08:00
-H, --no-header Suppress header row.
-d, --delimiter delim Specify an alternative column delimiter. Default is , (comma).
2020-10-18 19:49:23 +08:00
-R, --row-delimiter delim Specify a row delimiter. Default is \\n (ASCII value 10).
2020-10-25 18:24:28 +08:00
-Q, --no-quote Don't wrap text-like fields (text, memo, date) in quotes. If not specified text fiels will be surrounded by " (double quote) characters.
-q, --quote char Use char to wrap text-like fields. Default is " (double quote).
-X, --escape char Use char to escape quoted characters within a field. Default is doubling.
2020-12-20 02:21:32 +08:00
-e, --escape-c Use C-style escaping for return (\\r), tab (\\t), line-feed (\\n), and back-slash (\\\\) characters. Default is to leave as they are.
2020-10-25 18:34:53 +08:00
-I, --insert backend INSERT statements (instead of CSV). You must specify which SQL backend dialect to use. Allowed values are: access, sybase, oracle, postgres, mysql and sqlite.
2020-09-02 21:53:50 +08:00
-N, --namespace prefix Prefix identifiers with prefix.
2020-10-25 18:24:28 +08:00
-S, --batch-size int Size of insert batches on supported platforms.
-D, --date-format fmt Set the date format (see strftime(3) for details.
-T, --datetime-format fmt Set the date/time format (see strftime(3) for details.
-0, --null char Use char to represent a NULL value.
2020-10-18 19:49:23 +08:00
-b, --bin strip|raw|octal|hex Binary export mode: strip binaries, export as-is, output \\ooo style octal data or output \\xx style hexadecimal data.
2020-10-25 18:24:28 +08:00
-B, --boolean-words Use TRUE/FALSE in Boolean fields (default is 0/1).
2003-01-05 22:57:50 +08:00
NOTES
2020-10-25 18:24:28 +08:00
Most of the formatting options actually also works with --insert.
2003-01-05 22:57:50 +08:00
2011-08-29 07:53:29 +08:00
ENVIRONMENT
MDB_JET3_CHARSET Defines the charset of the input JET3 (access 97) file. Default is CP1252. See iconv(1).
MDBICONV Defines the output charset to use for the SQL file. Default is UTF-8. mdbtools must have been compiled with iconv.
MDBOPTS semi-column separated list of options:
* use_index
* no_memo
* debug_like
* debug_write
* debug_usage
* debug_ole
* debug_row
* debug_props
* debug_all is a shortcut for all debug_* options
2012-02-02 16:25:21 +08:00
SEE ALSO
2020-10-23 18:53:41 +08:00
mdb-array(1) mdb-count(1) mdb-header(1) mdb-hexdump(1)
mdb-import(1) mdb-json(1) mdb-parsecsv(1) mdb-prop(1) mdb-queries(1)
mdb-schema(1) mdb-sql(1) mdb-tables(1) mdb-ver(1)
2012-02-02 16:25:21 +08:00
2003-01-05 22:57:50 +08:00
HISTORY
2012-02-02 16:25:21 +08:00
mdb-export first appeared in MDB Tools 0.1.
2003-01-05 22:57:50 +08:00
AUTHORS
2012-02-02 16:25:21 +08:00
The mdb-export utility was written by Brian Bruns.
2003-01-05 22:57:50 +08:00
BUGS
Memo fields are allowed to contain a newline characters, the current program does nothing about this.