BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
WilliamB
Obsidian | Level 7

Hello,

I'm trying to get that

 

abCopt
Tom5245678
Titi88 

 

 

But my code does not work:

Here is my code and my tables

 

 

 

Data employee;
input a $ b;
datalines;
Tom 52
Titi 88
;
run;


Data portefeuille;
input b Copt D;
datalines;
52 45671 201929
52 45678 201930
56 45897 201930

;
run;

 

proc sql;
create table comp as
select emp.*,Port.Copt
from employee as emp left join portefeuille as Port on Port.b=emp.b
where Port.D = 201930;
quit;

 

 

 

Thanks for your help

 

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

Use AND

 

from employee as emp left join portefeuille as Port on Port.b=emp.b
and Port.D = 201930;

View solution in original post

2 REPLIES 2
novinosrin
Tourmaline | Level 20

Use AND

 

from employee as emp left join portefeuille as Port on Port.b=emp.b
and Port.D = 201930;
WilliamB
Obsidian | Level 7
Thank you so much. Have a good day