Skip to content

Instantly share code, notes, and snippets.

@daynebatten
Created May 9, 2015 11:56
Show Gist options
  • Select an option

  • Save daynebatten/f787ce09755dfba486ce to your computer and use it in GitHub Desktop.

Select an option

Save daynebatten/f787ce09755dfba486ce to your computer and use it in GitHub Desktop.
/* Merge our raw data with our constraint categories to determine which constraints apply to which data points */
proc sql;
create table
joined
as select
t.*,
con,
case when
(t.county = l.county and l.degree = 'dummy' and t.degree ~= 'ALL')
or (t.degree = l.degree and l.county = 'dummy' and t.county ~= 'ALL')
then 1 else 0 end as included
from
testset as t
left join
levels as l
on
1 = 1;
quit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment