Question: Performing a One - to - Many Merge The pg 2 . np _ 2 0 1 6 traffic table contains monthly traffic statistics from

Performing a One-to-Many Merge
The pg2.np_2016traffic table contains monthly traffic statistics from the National Park Service for parks. Create a table that contains the monthly traffic statistics from the pg2.np_2016traffic table and adds a column for the park name. Park name values can be found in the matching pg2.np_codelookup table.
a. Open the p205p03.sas program in the practices folder. Submit the two PROC SORT steps. Determine the name of the common column in the sorted tables.
b. Modify the second PROC SORT step to use the RENAME= option after the pg2.np_2016traffic table to rename Code to ParkCode. Modify the BY statement to sort by the new column name.
Note: You could also rename the column in the DATA step after the table in the MERGE statement.
c. Write a DATA step to merge the sorted tables by the common column to create a new table, work.trafficStats. Drop the Name_Code column from the output table.
\table[[,A ParkCode,Year,(12) Month,(23) MonthCount,ParkName, Region,Type],[1,ABLI,2016,1,2,159,Abraham Lincoln Birt..,Southeast,National Histori.],[2,ABLI,2016,2,2.057,Abraham Lincoln Birt..,Southeast,National Histori.],[3,ABLI,2016,3,4.630,Abraham Lincoln Birt..,Southeast,National Histori.],[4,ABLI,2016,4,6.602,Abraham Lincoln Birt..,Southeast,National Histori.],[5,ABLI,2016,5,6.459,Abraham Lincoln Birt..,Southeast,National Histori.],[6,ABLI,2016,6,7.739,Abraham Lincoln Birt..,Southeast,National Histori.],[7,ABLI,2016,7,14,016,Abraham Lincoln Birt..,Southeast,National Histori.],[8,|)?,2016,8,10227,Dhraham lincoln Birt,Southeast,National Histori]]
 Performing a One-to-Many Merge The pg2.np_2016traffic table contains monthly traffic statistics

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!