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.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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