Query parameters

Top  Previous  Next

Each study definition must specify a study type and a query that it will use to gather data from the database.  Each study type has parameter requirements for the query it uses.  The study types and required parameters are shown here.l

 

Study type:

Description:

Parameters required in query:

All Data

 

The all data study gathers collisions by date range. It is not specific to a location.

FirstDate (DateTime)

LastDate (DateTime)

Address

 

 

The Address study gathers collisions by date range, route and address range.

FirstDate (DateTime)

LastDate (DateTime)

Route (String)

FirstAddress (whole number)

LastAddress (whole number)

Case Id

(CID)

The CID study provides the ability to query the database for case id's that have been populated in the crash magic system tables. This query  uses the user group id, user id, project id and the study id of the user that is logged in.

cmUserGroupId (Floating point number)

cmUserId (Floating point number)

cmProjectId (Floating point number)

cmStudyId (Floating point number)

Intersection

 

 

The Intersection study provides the ability to query the database by date range plus primary and cross streets.  This is the standard study for urban areas and rural areas where mileposts don't exist.

 

Note that the parameters column specifies two parameters each for Primary Street and Cross Street.  PrimaryStreet and CrossStreet2 will always have same street value. CrossStreet and PrimaryStreet2 will also have the same values.  The SQL query requires this duplication in order to check for intersections with "primary & cross" as well as "cross & primary".

FirstDate (DateTime)

LastDate (DateTime)

PrimaryStreet (String)

CrossStreet (String)

 

X,Y Coordinate

(xyrect)

 

 

The xyrect study gathers crashes by prompting for a date range plus a rectangular area (X min/max and Y min/max values) that indicates a coordinate range from a GIS system.

FirstDate (DateTime)

LastDate (DateTime)

XMin (Floating point number)

YMin (Floating point number)

XMax (Floating point number)

YMax (Floating point number)

 

Node

 

 

The Node study uses a date range,  and optionally a node identifier, up to two additional unique identifiers.  These unique identifiers might specify a county, city, zip code, etc.  The unique identifiers are only needed if multiple, non-unique instances of the node number occur in the database.

FirstDate (DateTime)

LastDate (DateTime)

Unique1 (String)

Unique2 (String)

Node_NUM (whole number)

 

Route + Milepost

(milepost)

 

 

The milepost study uses a date range plus a route name/id and milepost range.

FirstDate (DateTime)

LastDate (DateTime)

Route (String)

FirstMilepost (Floating point number)

LastMilepost(Floating point number)