Batch convert TXT files to SQL files

Want to batch convert TXT files to SQL files?

Try Withdata Data File Converter, a desktop TXT to SQL converter for Windows, MacOS, and Linux, Batch convert TXT to SQL, Easy and Fast.

Download DataFileConverter Download DataFileConverter

Batch convert TXT files to SQL files

Select source TXT files -> Set SQL files -> Convert TXT files to SQL files

Click “Start a New Convert” at task dialog.

bulk convert TXT files to SQL files - task window

then show the wizard.

Select From “Files” “TXT” To “Files” “SQL”.

batch transform TXT files to SQL files - select type

1. Select source TXT files.

batch create SQL files from TXT files- select TXT file folder

And config the first source TXT file.

batch create SQL files from TXT files- config TXT file

2. Config target SQL files.

batch generate Sql files by TXT files - config SQL files

3. Summary.

List source TXT files.

batch convert TXT files to SQL files - list TXT files

 

batch convert TXT files to SQL files - summary

4. Convert TXT files to SQL files, 1 TXT to 1 SQL.

batch convert TXT files to SQL files - convert files

After converting, you can view output SQL files.

Convert TXT file to SQL file - view SQL file


More about TXT to SQL converter

See also:

TXT → SQL reference

Type mapping

Value kindin TXTin SQL
Int1234, or right-aligned in a fixed-width columnINT
Bigint9007199254740993BIGINT
Decimal1234.56DECIMAL(p,s)
Float1.234e+10DOUBLE PRECISION
Textwritten as-is; padding depends on the chosen layoutVARCHAR(n)
Long textwritten as-isTEXT / CLOB
Datewhatever the writer choseDATE
Datetimewhatever the writer choseTIMESTAMP
Binarynot representableBLOB / BYTEA
BooleanY / N, or 1 / 0, or TRUE / FALSEBOOLEAN / SMALLINT
JSONwritten as-isJSON / TEXT

Dialect differences

Both TXT and SQL are file formats, so what differs below is how each one chooses to represent a value.

Propertyin TXTin SQL
identifiersNone by conventionTwo competing conventions: single-quoted literals and diale...
datesWhatever the writer produced; no convention is guaranteedDepends on the dialect: DATE literals, TO_DATE(), or plain ...
binaryNot supportedDialect-specific: X-quoted literal, 0x hex, or decode()
separatorWhatever was chosen - often fixed column widthsStatement terminators (;)
encodingNo declaration - UTF-8 works only with a BOMNo declaration
typingNone - every field is textTypes belong to the target database, and they differ betwee...
shapeFree form; a parser has to be told the layoutStatements; a dump usually means CREATE TABLE plus INSERT rows
ceilingNo formal limitNo formal limit, but a single INSERT statement has to fit i...

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.


Posted

in

by