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 [10-25]


We will then join the POSTCODE table with the SALES_Q1_LOC table.

The code below creates a new table called SALES_Q1_LOC_POC.
proc sql;
create table sales_q1_loc_pos as
select a.*, b.os_x as cust_x, b.os_y as cust_y
from sales_q1_loc a left join postcode b
on a.customer_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 SALES_Q1_LOC_POS table contains the eight columns from the SALES_Q1_LOC table:
  • Configuration
  • Customer_postcode
  • Store_postcode
  • Month
  • Tran_date
  • Price
  • STORE_X
  • STORE_Y

It also contains two additional columns from the POSTCODE table:
  • CUST_X
  • CUST_Y

The CUST_X and CUST_Y columns are the easting and northing coordinates for the customers' addresses.
Picture
Next
Already a member? Go to member's area.