Convert SQLITE to DTA
Turn SQLITE files into DTA files. A Stata 14 file (format 118), which Stata 14 and later open.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop SQLITE files on the dialor turn it to pick what to do
One Stata file for each table.Your SQLite database becomes DTA files that Stata 14 and later open.
What you get
Each table becomes its own DTA file, named after the table. The files come out in table name order. They use Stata 14 format (format 118).
Views are skipped, so only real tables are written.
How columns are converted
Integers and reals become numbers. Columns declared DATE or TIMESTAMP become dates and date-times. Dates are stored as %td and other times as %tc. Text columns stay text, even when the text holds dates.
Whole numbers become byte, int or long variables where they fit. Text longer than 2,045 bytes becomes a strL. Blobs become escaped text, and NULL becomes missing.
A table with text stored in a number column is written as text.
Column names
Stata names use up to 32 letters, digits and underscores. A column name that does not fit is changed to one that does. The original name is kept as the variable label, so you can still see it.
To go the other way, use DTA to SQLITE.
SQLITE and DTA.What each format is.
The formats
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
Stata Data
Stata datasets.
- Extensions
- .dta
- MIME type
- application
/x -stata -dta - Kind
- Text and data
In your code.The same SQLITE to DTA conversion through the API, for your app or your agent.
$ cv convert report.sqlite report/ --to dta$ cv convert report.sqlite report/ --to dtaQuestions.What people ask about SQLITE to DTA.
Yes. Each table is written to one DTA file named after it. Views are not written.
The file is in Stata 14 format, which Stata 14 and later open.
Columns declared DATE or TIMESTAMP do. Text columns stay text even when they hold dates.
NULL becomes missing in Stata. Blobs become escaped text.