hk_exportcsv(1)

hk_exportcsv1

Exports the result set of a query or a table into a comma separated list (csv). hk_exportcsv is part of the hk_classes package

Usage

hk_exportcsv -d driver -b database [OPTIONS] datasourcename

Overview

hk_exportcsv exports the result set of a query or a table into a comma separated list (CSV). The data will be printed to stdout. To create a table or a query use knoda (http://www.knoda.org). If the datasource is not a table set the --query option.

Options

-b, --database=DATABASE

database name

--between=BETWEEN

column separator, default is ','

-d, --driver=DRIVERNAME

set the SQL-driver (e.g. mysql). You can get a list of all existing SQL-drivers with -l or --list

--delimiter=TEXTDELIMITER

the text delimiter, default is '"'

--df=dateformat

date format, may contain M D Y, example: D.M.Y

--tf=timeformat

time format, may contain h m s , example: h:m:s

--dtf=datetimeformat

datetime format, may contain M D Y h m s, example: D.M.Y h:m:s

--locale=locale

locale of the export file, influences the number appearance

--charset=charset

charset of the export file

-f, --filter=FILTER

filter of the datasource. It has the same syntax as the WHERE clause of a SQL statement, just without the 'WHERE'. Example: "author_id = 5"

-h, --host=HOST

name or IP-number of the host

-l, --list

List available database drivers

--noheader

if set the column names will not be included in the first row

-p, --password=PASSWORD

user password at the SQL server

-q, --query

if set the datasource is a query, not a table

-r, --port=PORT

TCP-port on host

-u, --user=USERNAME

user name at the sql-server

--version

version and author of hk_classes

Diagnostics

hk_exportcsv returns 0 if everything was ok, or 1 if an error occured. A clear text error message will be written to stderr.

Releases

3 releases since Debian 3.1 (Sarge); the text changed 1 time.

  1. 3.1
  2. 4.0–5.0

--charset since Debian 4.0 (Etch); --df since Debian 4.0 (Etch); --dtf since Debian 4.0 (Etch); --locale since Debian 4.0 (Etch); --tf since Debian 4.0 (Etch).

Author

Horst Knorr <[email protected]>

From libhk-classes-dev 0.8.3-4 in Debian 5.0 (Lenny). Parsed by carta from the page's man source.