Convert XPT to SQLITE

Turn XPT files into SQLITE. A SQLite database with one table named data and one column per variable.

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

SAS Transport data in a SQLite table.One table named data, with one column per variable.

  1. What you get

    A SQLite database in one file. It holds a single table named data, and each variable in the XPT file becomes a column. Variable names, numbers and text are kept as stored.

    Missing numbers are left NULL, so an empty value in SAS stays empty in the database.

  2. How columns are typed

    A numeric variable without a format becomes an integer column when every value is whole. Other numbers become doubles. Text becomes text strings.

    SAS formats such as DATE9., TIME8. and DATETIME20. become dates and times. They are stored as text, for example 2024-02-03 for a date and 2024-02-03 09:15:00 for a date and time.

  3. Going the other way

    To write a SQLite table back to a transport file, use SQLITE to XPT. For other conversions from this format, see every XPT conversion.

XPT and SQLITE.What each format is.

The formats

From · XPT

SAS Transport

SAS transport files, the exchange format regulators accept.

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

SQLite Database

A whole relational database in one file. Tables, indexes and views.

Extensions
.sqlite .sqlite3 .db
MIME type
application/vnd.sqlite3
Kind
Text and data

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

terminal
$ cv convert report.xpt report.sqlite
$ cv convert report.xpt report.sqlite

Questions.What people ask about XPT to SQLITE.

01OF 04

One. It is named data, and every variable from the XPT file is a column in it.

Variables with a SAS date or time format, such as DATE9., TIME8. or DATETIME20., become dates and times. They are stored as text, such as 2024-02-03 or 2024-02-03 09:15:00.

A numeric variable without a format becomes an integer column when every value is whole. Other numbers become doubles.

They are left NULL in the database.

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