i am using proc sql to join and want to use a condition something like this which was used in datastep.
if mapsubmitted="Y" and (cats(substr(term,1,1),substr(term,length(term)))="()" or term="*") then do;
_rc=_values_.add();
end;
i am using the below
proc sql;
create table _values_ as
select distinct b.table,b.column,b.origin,b.originwhere,b.algorithm
from vcol a right join source_columns b
on a.origin=b.origin
where substr(b.term,length(b.term))="()";
quit;
i used where substr(b.term,length(b.term))="()";
In this i want to take values in term which are enclosed in "()" or which has "*".
values in term are below. i want to take only terms which are enclosed in () and which has *.
(MMSE)
|
can any one help me on this.
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.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.