logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mdb-export - Export data in an MDB database table to CSV format.

Authors

       The mdb-export utility was written by Brian Bruns.

Bugs

       Memo fields are allowed to contain a newline characters, the current program does nothing about this.

MDBTools 1.0.1                                   05 January 2025                                   mdb-export(1)

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.

       Used with --insert, it outputs SQL specific to backend dialect, including some constraints like NOT  NULL
       and foreign keys.

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
              Colon-separated list of options:

              •  debug_like

              •  debug_write

              •  debug_usage

              •  debug_ole

              •  debug_row

              •  debug_props

              •  debug_all is a shortcut for all debug_* options

              •  no_memo (deprecated; has no effect)

              •  use_index (experimental; requires libmswstr)

History

mdb-export first appeared in MDB Tools 0.1.

Name

mdb-export - Export data in an MDB database table to CSV format.

Notes

       Most of the formatting options actually also works with --insert.

Options

-H,--no-header
              Suppress header row.

       -d,--delimiterdelim
              Specify an alternative column delimiter. Default is , (comma).

       -R,--row-delimiterdelim
              Specify a row delimiter. Default is \n (ASCII value 10).

       -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,--quotechar
              Use char to wrap text-like fields. Default is " (double quote).

       -X,--escapechar
              Use char to escape quoted characters within a field. Default is doubling.

       -e,--escape-invisible
              Use C-style escaping for return (\r), tab (\t), line-feed (\n), and  back-slash  (\\)  characters.
              Default is to leave as they are.

       -I,--insertbackend
              INSERT  statements  (instead  of  CSV). You must specify which SQL backend dialect to use. Allowed
              values are: access, sybase, oracle, postgres, mysql and sqlite.

       -N,--namespaceprefix
              Prefix identifiers with prefix.

       -S,--batch-sizeint
              Size of insert batches on supported platforms.

       -D,--date-formatfmt
              Set the date format (see strftime(3) for details.

       -T,--datetime-formatfmt
              Set the date/time format (see strftime(3) for details.

       -0,--nullchar
              Use char to represent a NULL value.  -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.

       -B,--boolean-words
              Use TRUE/FALSE in Boolean fields (default is 0/1).

       --version
              Print the mdbtools version and exit.

See Also

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)

Synopsis

mdb-export [--no-header] [--delimiterdelim] [--row-delimiterdelim] [[--no-quote] | [--quotechar [--escapechar]]] [--escape-invisible] [--date-formatfmt] [--datetime-formatfmt] [--bin strip|raw|octal|hex] [--boolean-words] databasetablemdb-export--insertbackend [--namespaceprefix] [--batch-sizeint] databasetablemdb-export-h|--helpmdb-export--version

See Also