Convert SQL to XPT

Turn SQL files into XPT files. A SAS transport file of version 5, the kind SAS and the FDA read.

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

One SAS Transport file for each table in your script.Each table the SQL script creates becomes its own XPT file, named after the table.

  1. What you get

    One XPT file per table, named after the table and written in name order. A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect first, so it does not have to come from SQLite.

    Integers and decimals become numbers. Columns declared DATE, DATETIME or TIMESTAMP become dates and date-times, shown as DATE9. and DATETIME20. Times are shown as TIME8.

  2. How values change

    Text columns stay text, even when they hold dates. Binary values become escaped text, and NULL becomes missing.

    Dates that are not real dates, such as MySQL's 0000-00-00, become missing. PostgreSQL true and false become 1 and 0.

  3. What is left behind

    Views, functions and triggers are left out, and the conversion gives a warning for them. Only tables are written.

    Column names are cut to 8 letters, digits and underscores. When a name changes, up to 40 characters of the original are kept as its label. Text longer than 200 bytes is cut.

SQL and XPT.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 · XPT

SAS Transport

SAS transport files, the exchange format regulators accept.

Extensions
.xpt
MIME type
application/x-sas-xport
Kind
Text and data

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

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

Questions.What people ask about SQL to XPT.

01OF 04

One XPT file for each table the script creates. A script with three tables gives three files.

Yes. A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect before the tables are read.

They are cut to 8 letters, digits and underscores. A changed name keeps up to 40 characters of the original as its label.

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

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