Loading the 2019 VAERS MDB Access File into SQL Server

Loading the 2019 VAERS MDB Access file into SQL Server 

The organization, medalerts.org, has compiled the yearly VAERS datasets into an MS Access database.

They have also made the Access MDB file available for download. In one table, it contains all the VAERS data from 1990 until the end of the previous year. (At the time of this writing, the end of 2019).

This is very useful for queries spanning all the years, especially aggregate queries like counts.

Download:
Download the Access MDB file here:
https://medalerts.org/vaersdb/access.php

It is in Zip format, 162 megabytes

Unzip the file.
You should get a file named: vaersTo2019.mdb
657M (February 2020)

Load into SQL Server:
To load into SQL Server, use the SSMS (Sql Server Management Studio) GUI.

If not created already, create a SQL Server database called: VAERS_2019

In SSMS
Right click on the database
Tasks
Import Data

Be sure to choose the datatype, Access

Choose the file, on your hard drive, vaersTo2019.mdb.
No username or password

Destination
SQL Server, VAERS_2019

 

Copy data from one or more tables or views

The potential tables to import will be:

FindManLotFrequency
SortFrequency
Vaccines
VAERSDATA

 

 

Choose only VAERSDATA

The other tables are only used in Access, and not needed in SQL Server

Click through.

Load starts and finishes.

 

 

It is an easy load.

Primary Key:
After loading the table VAERSDATA, give it a primary key

use VAERS_2019;
GO

alter table
dbo.[VAERSDATA]
add constraint pk_vaersdata
primary key
( vaers_id ) ;
go

 

Quick Query:

Do a quick query to see if the data loaded

use vaers_2019;
go

select
min (vaers_id) min_vaers_id
, max (vaers_id) max_vaers_id
, count(*) count
from dbo.[VAERSDATA];
go

Results:

min_vaers_idmax_vaers_idcount
25001856660759,483

Leave a Reply

Your email address will not be published. Required fields are marked *