% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/advanced.R
\name{mdb_export}
\alias{mdb_export}
\title{Export Data In An MDB Table To CSV Or INSERT SQL}
\usage{
mdb_export(
  path,
  table,
  no_header = FALSE,
  delimiter = ",",
  row_delimiter = "\\n",
  no_quote = FALSE,
  quote = "\\"",
  escape = NULL,
  escape_invisible = FALSE,
  date_format = "\%Y-\%m-\%d",
  datetime_format = "\%Y-\%m-\%d \%H:\%M:\%S",
  null = "",
  bin = c("strip", "raw", "octal", "hex"),
  boolean_words = FALSE,
  insert = NULL,
  namespace = NULL,
  batch_size = 1L,
  n = -1L
)
}
\arguments{
\item{path}{Path to \code{.mdb}/\code{.accdb} file.}

\item{table}{Table name.}

\item{no_header}{Logical, equivalent to \code{-H/--no-header}.}

\item{delimiter}{Equivalent to \code{-d/--delimiter}.}

\item{row_delimiter}{Equivalent to \code{-R/--row-delimiter}.}

\item{no_quote}{Equivalent to \code{-Q/--no-quote}.}

\item{quote}{Equivalent to \code{-q/--quote}.}

\item{escape}{Equivalent to \code{-X/--escape}.}

\item{escape_invisible}{Equivalent to \code{-e/--escape-invisible}.}

\item{date_format}{Equivalent to \code{-D/--date-format}.}

\item{datetime_format}{Equivalent to \code{-T/--datetime-format}.}

\item{null}{Equivalent to \code{-0/--null}.}

\item{bin}{Binary mode (\code{strip}, \code{raw}, \code{octal}, \code{hex}) for parity.}

\item{boolean_words}{Equivalent to \code{-B/--boolean-words}.}

\item{insert}{Backend for \code{-I/--insert} mode.}

\item{namespace}{Equivalent to \code{-N/--namespace}.}

\item{batch_size}{Equivalent to \code{-S/--batch-size}.}

\item{n}{Optional row limit (\verb{LIMIT n}).}
}
\value{
Character scalar containing CSV or SQL INSERT text.
}
\description{
\code{mdb-export} is a utility program distributed with MDB Tools.
It produces CSV output for the given table. Such output is suitable for
importation into databases or spreadsheets.
}
\details{
Used with \code{insert}, it outputs backend-specific SQL \code{INSERT} statements.
Most formatting options also apply in insert mode.
}
\examples{
db <- mdbr:::.mdb_example_nwind_path()
if (nzchar(db)) {
  cat(mdb_export(db, "Products", n = 2))
}
}
