January 2017
Beginner to intermediate
372 pages
5h 55m
English
The crash data has many columns that store the data in codes. In order to make this data useful for reporting, we need to add description columns. In this section, we will create four code tables by importing data into a SQL Server database. Then, we will add the tables to your existing model.
In the Chapter 3 database on your SQL Server, run the following scripts to create the four tables and populate them with the reference data:
Major Cause of Accident Reference Data table: CREATE TABLE [dbo].[MAJCSE_T](
[MAJCSE] [int] NULL,
[MAJOR_CAUSE] [varchar](50) NULL
) ON [PRIMARY]
INSERT INTO MAJCSE_T VALUES (20, 'Overall/rollover'), (21, 'Jackknife'), (31, 'Animal'), (32, 'Non-motorist'), ...
Read now
Unlock full access