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

Hello! So I need to create a list using proc sql because I am running a statistical test that runs a bunch of tests cross referencing the variables called for in the variable list.

 

My proc sql code is:

proc sql noprint;
select name into :tier1snps separated by ' '
from dictionary.columns
where libname=upcase("work") and memname=upcase("domsnp")
and (substr(name, 1, 3) in ('dom') or substr(name,1) in ('DOM_RS10462018','DOM_RS7107287','DOM_RS11022778','DOM_RS969485'));

quit;

 

The list I get when I do %put &tier1snps is:

DOM_RS10462018 dom_rs12915776 dom_rs8041466 dom_rs4775351 dom_rs34720147

dom_rs2305159 DOM_RS7107287 dom_rs1801260 dom_rs1982350 DOM_RS969485

dom_rs2414680 dom_rs11071557 dom_rs809736 dom_rs782931 dom_rs4774388

DOM_RS11022778 dom_rs13329238 dom_rs12906588 dom_rs738499 dom_rs5758324

dom_rs8023563
dom_rs16943472 dom_rs2267150

 

I want to get rid of the last entry "dom_rs2267150" but I cannot figure out how to manually drop entries, although I figured out how to manually add entries. This would be a great help! Thank yo uso much!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Add another condition to your query:

 

And name not in (exclusion list);

View solution in original post

2 REPLIES 2
Reeza
Super User

Add another condition to your query:

 

And name not in (exclusion list);

ljung
Calcite | Level 5
Thank you so much! That worked perfectly!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

Register now!

What is Bayesian Analysis?

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 691 views
  • 0 likes
  • 2 in conversation