Batch import data from TXT files to Azure SQL database without programming

Want to batch import data from TXT files to SQL Server ?

Using FileToDB, a native GUI tool, you can batch import data from TXT files to SQL Server easily and fast, no need to program, just a few mouse clicks!

Support Windows, Linux, macOS.

Support large TXT files (big than 4GB).

Support multiple TXT file encodings: ANSI, UTF-8, UTF-8BOM, UCS-2LE (Unicode Little Endian), UCS-2BE (Unicode Big Endian), CP1250 (Central European), CP1251 (Cyrillic), CP1252 (Western European), CP1253 (Greek), CP1254 (Turkish ), CP1255 (Hebrew), CP1256 (Arabic), CP1257 (Baltic), CP1258 (Vietnamese), CP437 (United States), CP850 (Western European), CP852 (Central European), CP866 (Cyrillic), CP874 (Thai), CP932 (Japanese), CP936 (Chinese Simplified), CP949 (Korean), CP950 (Chinese Traditional), ISO-8859-1 (Western European), ISO-8859-2 (Central European), ISO-8859-15 (Latin 9), KOI-8 (Cyrillic), Macintosh (Western European).

Here you can download and install FileToDB.

Batch import data from TXT files to SQL Server

Choose SQL Server and logon.

convert online TXT file to SQL Server table - Choose SQL Server and logon

Click “Wizard – N Files To 1 Table” at task dialog.

convert online TXT file to SQL Server table - task window

Select the “TXT” file type.

Import file data to database table - select file type

then show the wizard.

1. Select a folder that constains TXT files.

Batch import TXT files data To SQL Server - select a folder

2. Config first TXT file importing options.

Batch import TXT files data To SQL Server - config first file

3. Select a SQL Server table and config fields.

Bulk load TXT files data To SQL Server - select table

4. Preview data.

Batch transfer TXT files data To SQL Server - preview

5. Import.

Batch copy TXT files data To SQL Server - import data

View imported data

Batch copy TXT files data To SQL Server - view data

You can schedule and automate this converting task by:

1) Save session and create .bat file.

2) Set scheduled task.


More about FileToDB – the tool to batch import data from TXT files to SQL Server

30-day free trial Download FileToDB

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...

Convert your data online, free

Free in-browser converters for CSV, Excel, JSON, XML and SQL: Withdata Online Data Conversion. Large files, batch conversion or scheduling? See the offline desktop apps, or browse all data conversion tools.