dbf2msql1
Insert xbase-style .dbf-files into an msql or postgres95-table
Usage
dbf2msql [options]
dbf-file
dbf2pg [options]
dbf-file
Options: [-v
[v]]
[-f]
[{-u | -l}]
[{-c | -D}]
[-d
database]
[-t
table]
[-h
host]
[-s
oldname=newname
[,oldname=newname]]
[-p
primary
key]
[-s
start]
[-e
end]
Overview
This manual page documents the programs dbf2msql and dbf2pg. These take an xBase-style .dbf-file, and insert it into the specified database and table.
Options
-
-v -
Display some status-messages.
-
-vv -
Also display progress.
-
-f -
Convert all field-names from the .dbf-file to lowercase.
-
-u -
Convert the contents of all fields to uppercase.
-
-l -
Convert the contents of all fields to lowercase.
-
-c -
Create the table specified with -t. If this table already exists, first DROP it.
-
-D -
Delete the contents of the table specified with -t. Note that this table has to exists. An error is returned if this is not the case.
-
-d database -
Specify the database to use. An error is returned if this database does not exists. Default is "test".
-
-t table -
Specify the table to insert in. An error is returned if this table does not exists. Default is "test".
-
-h host -
Specify the host to which to connect. Default is "localhost".
-
-s oldname=newname[,oldname=newname] -
Change the name of a field from
oldnametonewname. This is mainly used to avoid using reserved SQL-keywords. Example:
-s SELECT=SEL,COMMIT=doit
This is donebeforethe -f operator has taken effect!
- -p primary key
-
Specify which field to use as the primary key. Only for
dbf2msql. This operates on the fieldnames that are valid AFTER substitutions with -s are carried out!
-
-s start -
Specify the first record-number in the xBase-file we will insert.
-
-e end -
Specify the last record-number in the xBase-file we will insert.
Environment
These programs are effected by the environment-variables as used by mSQL and Postgres95. See the documentation of those programs for more info.
Releases
Unchanged in 2 releases since Debian 2.0 (Hamm).