Because I could not find my question amng the latest ones, so I send it again. If you find it somewhere else as well, I apologize for that.
I use the following code to create a subset when the value of a variable is equal to a variable in another dataset.
create table want as select *
where id in(select id from have2); quit;
However, I don't want to create a subset, but I want to say id_dummy=1 if id is in have2.
I appreciate any suggestion.
If you don't have duplicates you can use a merge and check for matches.
If you have duplicates you can remove them and then use a merge and check for matches.
You could use an inline query with a CASE statement
CASE WHEN (SELECT A.NAME FROM HAVE AS _X WHERE A.NAME=_X.NAME) IS NOT NULL THEN 1
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.