NAME
sqlimport - import data from a file into a database table

SYNOPSIS
sqlimport [OPTION...] TABLE [FILE]
 
DESCRIPTION
sqlimport imports data stored in FILE into TABLE. Data stored in FILE can be in one of these formats: Delimited or Fixed Width Columns; see -f option for details. If FILE is not specified, sqlimport will read data from the standard input.

OPTIONS
If both short form and long form are specified on the command line, the long form will take precedence.

-c, --charset CHARSET
The character set for reading data; supported values are: 'UTF-8' and 'platform-default', default to 'UTF-8'.

-d, --database DATABASE
The name of the database where TABLE is defined, default to the connected database.

-de, --debug DATABASE
Enabled debug information sent to stderr.

-f, --format FORMAT
The format of data stored in FILE; supported values are: 'csv', 'fixed', default to 'csv'.

-k, --session-id SESSION_ID
Use the server connection associated with the session identified by SESSION_ID.

-l, --line-separator LINE-SEPARATOR
The line separator; supported values are: 'unix', 'windows', default to platforms line separator.

-s, --schema SCHEMA
The name of the schema where TABLE is defined, default to the currently connected schema.

-CN, --column-names BOOLEAN
Indicates whether the first row contains column names, default to 'true'. See BOOLEAN VALUES section below for supported BOOLEAN values.
 
-DS, --decimal-symbol SYMBOL
Decimal symbol; default to '.'.

-II, --identity-insert BOOLEAN
Enable or disable identity insert, default to 'false'. See BOOLEAN VALUES section below for supported BOOLEAN values.

-NT, --null-text BOOLEAN
Indicates if NULL value is represented as (null) text, default to 'true'. See BOOLEAN VALUES section below for supported BOOLEAN values.

-PA, --datetime PATTERN
Pattern for formatting date and time, default to 'yyyyMMdd HH:mm:ss.SSS'.

-PD, --date PATTERN
Pattern for formatting date, default to 'yyyyMMdd'.

-PT, --time PATTERN
Pattern for formatting time, default to 'HH:mm:ss.SSS'.

-SQ, --string-quote IDENTIFIER
String quoted identifier; supported values are: 'double-quote', 'single-quote, 'none', default to 'double-quote'.

-TE, --tx-type TYPE
The transaction method applied to executed statements; supported values are: 'Full', 'Batch', 'Threshold', default to 'Full'.

-TS, --tx-batch-size BATCH-SIZE
Number of statements per transaction when transaction type is set to 'Batch'; default to '500'.

-TT, --tx-threshold THRESHOLD
Time limit threshold per transaction, in milliseconds, when transaction type is set to 'Threshold'; default to '5,000'.

-TW, --tx-wait-time WAIT-TIME
The amount of time to wait, in milliseconds, between transactions; disabled if negative value specified; default is disabled.

The following options will take effect if data format is set to 'csv':
 
-DD, --delimiter DELIMITER
The delimiter for separating data; default to ','. Use words 'tab', 'space' for setting tab character, space character, as delimiter respectively.

The following options will take effect if data format is set to 'fixed':

-CW, --column-widths COLUMN-WIDTHS
A list of comma separated widths. This option must be specified for 'fixed' data format.

The following options will take effect if transaction type is set to 'Batch' or 'Threshold':

-BCP, --sybase-bcp BOOLEAN
For Sybase ASE or Sybase IQ, enable or disable BCP (Bulk Copy), default to 'false'. See BOOLEAN VALUES section below for supported BOOLEAN values.
 
BOOLEAN VALUES:
The followings are supported BOOLEAN values: 'true', 'false', 'yes', 'no', 'on', 'off', '1', '0'.

EXAMPLES
To import data from a file to a database table
sqlimport TableName FileName


      To import data from a file to a database table that includes BLOB data types
sqlimport -s TableName FileName -TE Batch
NOTES

      If TABLE is a fully qualified name, and, -d or -s option is specified, -d and -s will overwrite the database or the schema used to qualify TABLE.
     

     -d: does not work on SQLite
     

     -s: does not work on SQLite
 

If you want to import files that contain a Binary Large Object (BLOB) data type, make sure to enable the option Convert binary to hex. Select File > Options > Results and check the box next to Convert binary to hex

SEE ALSO 
      sqlexport



  • No labels