Convert SQL to SAV

Turn SQL files into SAV files. An SPSS file in UTF-8.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop SQL files on the dialor turn it to pick what to do

SQL tables as SPSS data files.One SAV file per table the script creates, in UTF-8.

  1. What you get

    Each table in the script becomes its own SPSS file, named after the table. The files come in name order.

    Integers and decimals become numbers. Columns declared DATE, DATETIME or TIMESTAMP become dates and date-times. Dates are written as DATE11, date-times as DATETIME20 and times as TIME8.

  2. How the script is read

    A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect first, and then the tables are read from it. PostgreSQL true and false become 1 and 0.

    Views, functions and triggers are left out with a warning.

  3. What changes

    Text columns stay text, even when they hold dates. Binary values become escaped text, and NULL becomes system-missing. Dates that are not real dates, such as MySQL's 0000-00-00, become missing.

    Column names become SPSS names of up to 64 bytes. When a name changes, the original is kept as the variable label. Text longer than 32,767 bytes is cut.

SQL and SAV.What each format is.

The formats

From · SQL

SQL Script

SQL statements as text. A database dump that any SQL tool can read or replay.

Extensions
.sql
MIME type
application/sql
Kind
Text and data
To · SAV

SPSS Data

SPSS data files with variable labels and value labels.

Extensions
.sav .zsav
MIME type
application/x-spss-sav
Kind
Text and data

In your code.The same SQL to SAV conversion through the API, for your app or your agent.

terminal
$ cv convert report.sql report/ --to sav
$ cv convert report.sql report/ --to sav

Questions.What people ask about SQL to SAV.

01OF 04

Yes. The script produces one SAV file per table it creates, named after the table.

NULL becomes system-missing in the SPSS file.

Yes. A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect before it is converted. See every SQL conversion for the other formats a script can become.

No. Views, functions and triggers are left out, and a warning says so.

More conversions.Other ways in and out of SQL and SAV.