Sentry Page Protection
Geo-targeting Project [9-25]
We will now join the SALES_Q1 table with the LOCATIONS table. proc sql; create table sales_q1_loc as select a.*, b.os_x as store_x, b.os_y as store_y from sales_q1 a, locations b where a.store_postcode = b.postcode; quit; Did the code fail because the input data sets don't exist?
Copy and run the code below to create the input data sets. The code above creates a new data set called SALES_Q1_LOC. The SALES_Q1_LOC table contains the six columns from the SALES_Q1 table:
It also contains two additional columns from the LOCATIONS table:
The STORE_X and STORE_Y columns are the easting and northing coordinates of the corresponding stores. |