Hello,
let's say i have tables a and b.
a has var1 var2 and b has var3 var4
then i need to create a table that adds a column to table a named tag which depends on the first 5 chars of var1. so when substr(var1,1,5) is equal to a certain value of var3 then tag = var4.
here's the code:
proc sql;
select * from a left join b
on substr(var1,1,5) = var3;
quit;
assuming that there are only two values for var4. how come when i create a table that separates the two values of var3, their total count is different to the whole?
i feel i wasn't able to explain it well but if you understood what i'm trying to talk about your help is much appreciated. is there wrong with my code? or logic? or other thing? thanks a lot! 😃
... View more