Given the SAS data set EMPLOYEES:
EMPLOYEES
NAME SALARY
-------- ------------
Innis60000
Jolli50000
Ellis55000
Liu45000
The following SAS program is submitted:
proc print data = employees; where name like ‘_i%’;
run;
What is contained in the output?
A. Liu only
B. Innis and Ellis only
C. Innis, Ellis, and Liu only
D. Innis, Jolli, Ellis, and Liu
Why is the answer "A"??
I do not actually understand the condition name like '_i%'. Thanks!
There is a reason why Maxim #1 (Read the documentation) is number one.
From http://documentation.sas.com/?docsetId=lrcon&docsetTarget=p0eaz2e63dlj17n1i5z17z3h84vp.htm&docsetVer..., section LIKE Operator:
so there must be exactly one character before the "i", and only Liu satisfies this.
There is a reason why Maxim #1 (Read the documentation) is number one.
From http://documentation.sas.com/?docsetId=lrcon&docsetTarget=p0eaz2e63dlj17n1i5z17z3h84vp.htm&docsetVer..., section LIKE Operator:
so there must be exactly one character before the "i", and only Liu satisfies 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.