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
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
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.
then show the wizard.
Select From “File” “SQL” To “Files” “TXT”.
1. Open a source SQL file, select tables to convert to TXT files.
2. Config target TXT files.
3. Summary.
List selected tables.
4. Convert each SQL table to a separate TXT file.
After converting, you can view output TXT files.
Convert each SQL table to a separate TXT file in command line
Save “SQL table to TXT” session, then you can:
- Convert each SQL table to a separate TXT file in Windows command line.
- Convert each SQL table to a separate TXT file in Linux command line.
- Convert each SQL table to a separate TXT file in macOS command line.
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:
- Save session and create .bat (Windows) or .sh (Linux/macOS) file for “SQL table to TXT” conversion.
- Set scheduled task for “SQL table to TXT” conversion.
FAQ
More about Withdata DataFileConverter – Tables in SQL file to TXT converter
Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
SQL → TXT reference
Type mapping
| Value kind | in SQL | in TXT |
|---|---|---|
| Int | INT | 1234, or right-aligned in a fixed-width column |
| Bigint | BIGINT | 9007199254740993 |
| Decimal | DECIMAL(p,s) | 1234.56 |
| Float | DOUBLE PRECISION | 1.234e+10 |
| Text | VARCHAR(n) | written as-is; padding depends on the chosen layout |
| Long text | TEXT / CLOB | written as-is |
| Date | DATE | whatever the writer chose |
| Datetime | TIMESTAMP | whatever the writer chose |
| Binary | BLOB / BYTEA | not representable |
| Boolean | BOOLEAN / SMALLINT | Y / N, or 1 / 0, or TRUE / FALSE |
| JSON | JSON / TEXT | written as-is |
Dialect differences
Both SQL and TXT are file formats, so what differs below is how each one chooses to represent a value.
| Property | in SQL | in TXT |
|---|---|---|
| identifiers | Two competing conventions: single-quoted literals and diale... | None by convention |
| dates | Depends on the dialect: DATE literals, TO_DATE(), or plain ... | Whatever the writer produced; no convention is guaranteed |
| binary | Dialect-specific: X-quoted literal, 0x hex, or decode() | Not supported |
| separator | Statement terminators (;) | Whatever was chosen - often fixed column widths |
| encoding | No declaration | No declaration - UTF-8 works only with a BOM |
| typing | Types belong to the target database, and they differ betwee... | None - every field is text |
| shape | Statements; a dump usually means CREATE TABLE plus INSERT rows | Free form; a parser has to be told the layout |
| ceiling | No 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.