Convert each table data in a SQL file to a separate TXT file

Want to convert each table data in a SQL file to a separate TXT file at one time?

Try Data File Converter, a SQL converting tool for Windows, MacOS, and Linux, Convert tables in a SQL file to TXT files, Easy and Fast.

  • Can run in GUI mode, Step by Step, just a few mouse clicks.
  • Can run in Command line, for Scheduled Tasks and Streams.
  • Convert files locally and privately, avoid uploading large SQL file(s) to online services.

Download Withdata DataFileConverter Download DataFileConverter

Convert each table data in a SQL file to a separate TXT file

Select source SQL file -> Set target TXT file -> Convert SQL table to TXT

Click “Start a New Convert” at task dialog.

batch convert each table data in a SQL file to a separate TXT file - task window

then show the wizard.

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

extract each table data in a SQL file to a separate TXT file - select type

1. Open a source SQL file, select tables to convert to TXT files.

bulk convert each table data in a SQL file to a separate TXT file - select SQL file

2. Config target TXT files.

bulk extract each table data in a SQL file to a separate TXT file - config TXT files

3. Summary.

List selected tables.

transform each table data in a SQL file to a separate TXT file - list tables

convert each table data in a SQL file to a separate TXT file - summary

4. Convert each SQL table to a separate TXT file.

convert each table data in a SQL file to a separate TXT file - convert

After converting, you can view output TXT files.

convert each table data in a SQL file to a separate TXT file - view TXT file

Convert each SQL table to a separate TXT file in command line

Save “SQL table to TXT” session, then you can:

Set scheduled tasks for converting each SQL table to a separate TXT file

You can schedule and automate this SQL table to TXT converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “SQL table to TXT” conversion.
  2. Set scheduled task for “SQL table to TXT” conversion.

FAQ

What is Withdata DataFileConverter?
How long does it take to convert each SQL table to a separate TXT file?
Is it safe to convert each SQL table to a separate TXT file using DataFileConverter?
Can I convert each SQL table to a separate TXT file on Linux, Mac OS?
Can I convert each SQL table to a separate TXT file in command line?

More about Withdata DataFileConverter – Tables in SQL file to TXT converter

SQL → TXT reference

Type mapping

Value kindin SQLin TXT
IntINT1234, or right-aligned in a fixed-width column
BigintBIGINT9007199254740993
DecimalDECIMAL(p,s)1234.56
FloatDOUBLE PRECISION1.234e+10
TextVARCHAR(n)written as-is; padding depends on the chosen layout
Long textTEXT / CLOBwritten as-is
DateDATEwhatever the writer chose
DatetimeTIMESTAMPwhatever the writer chose
BinaryBLOB / BYTEAnot representable
BooleanBOOLEAN / SMALLINTY / N, or 1 / 0, or TRUE / FALSE
JSONJSON / TEXTwritten as-is

Dialect differences

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

Propertyin SQLin TXT
identifiersTwo competing conventions: single-quoted literals and diale...None by convention
datesDepends on the dialect: DATE literals, TO_DATE(), or plain ...Whatever the writer produced; no convention is guaranteed
binaryDialect-specific: X-quoted literal, 0x hex, or decode()Not supported
separatorStatement terminators (;)Whatever was chosen - often fixed column widths
encodingNo declarationNo declaration - UTF-8 works only with a BOM
typingTypes belong to the target database, and they differ betwee...None - every field is text
shapeStatements; a dump usually means CREATE TABLE plus INSERT rowsFree form; a parser has to be told the layout
ceilingNo formal limit, but a single INSERT statement has to fit i...No formal limit

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