Can somebody assist me .....How following query can be translated into either SAS HASH code (preferred)
or SAS QUERY code?
Below is a given SQL NATIVE Query ( note that there is + sign in a where clause):
SELECT DISTINCT A1.acod as acode,
A1.descp as FDESC,
catx(' - ', B1.scod,B1.tcod) as stcode
FROM X X0,
A A1,
B B1,
C C1
WHERE
A1.OFFICEID(+) = X0.officeid
AND B1.STATUSCD(+) = x0.STATUSCD
AND C1.Post(+) = X0.Post
AND C1.Pre(+) = X0.Pre
AND X0.Pre(+) = C1.Pre
AND X0.Post(+) = C1.Post
;
Quit;
@LinusH: I think the (+) indicates a left or right outer join depending upon whether it is on the left or right variable (see: https://chartio.com/resources/tutorials/left-and-right-joins-using-the-plus-sign-in-oracle/ )
Art, CEO, AnalystFinder.com
@LinusH: I think the (+) indicates a left or right outer join depending upon whether it is on the left or right variable (see: https://chartio.com/resources/tutorials/left-and-right-joins-using-the-plus-sign-in-oracle/ )
Art, CEO, AnalystFinder.com
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.