data etf;
input ticker $ overlap :$10.;
datalines;
A 9:30-10:30
B 10:30-2:00
C NONE
D .
;
data taq;
input symbol $;
datalines;
C
C
B
B
D
;
proc sql;
create table want as
select a.*,anydigit(overlap)>0 as newvar
from taq a left join etf b
on a.symbol=b.ticker;
quit;
... View more
OUTER UNION is for concatenating datasets, not merging And ALL is not allowed with OUTER UNION in SAS/SQL. So I suspect that it is not the operation you really want.
... View more
If both your data sets are sorted by your BY variables, MERGE is the most efficient way. What is your expected hit rate on the merge, and so you wish to keep alla observations from both data set in the result? Also I wonder about your data, MERGE on I individual loan amounts sounds a bit....odd. That sounds like measure, not a key variable.
... View more
You may also want to be aware that in many parts of the US the first three digits of a Zip code will not determine county.
For instance in my state we have 44 counties and only 7 different values of first three digits in the Zip, the county counts ranging from 1 to 11 per 3-digit code.
... View more