Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
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:
  • Configuration
  • Customer_postcode
  • Store_postcode
  • Month
  • Tran_date
  • Price

It also contains two additional columns from the LOCATIONS table:
  • STORE_X
  • STORE_Y

The STORE_X and STORE_Y columns are the easting and northing coordinates of the corresponding stores.
Picture
Next
Already a member? Go to member's area.