Question: Performing a One - to - Many Merge The pg 2 . np _ 2 0 1 6 traffic table contains monthly traffic statistics from
Performing a OnetoMany Merge
The pgnptraffic table contains monthly traffic statistics from the National Park Service for parks. Create a table that contains the monthly traffic statistics from the pgnptraffic table and adds a column for the park name. Park name values can be found in the matching pgnpcodelookup table.
a Open the ppsas 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 pgnptraffic 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 NameCode column from the output table.
tableA ParkCode,Year, Month, MonthCount,ParkName, Region,TypeABLI,Abraham Lincoln Birt..,Southeast,National Histori.ABLI,Abraham Lincoln Birt..,Southeast,National Histori.ABLI,Abraham Lincoln Birt..,Southeast,National Histori.ABLI,Abraham Lincoln Birt..,Southeast,National Histori.ABLI,Abraham Lincoln Birt..,Southeast,National Histori.ABLI,Abraham Lincoln Birt..,Southeast,National Histori.ABLI,Abraham Lincoln Birt..,Southeast,National Histori.Dhraham lincoln Birt,Southeast,National Histori
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
