Hello, i work on Viya 4 with sas Studio and flow.
Before i work with SQL Query. It's very clear for me with SQL. You have ton possibilities :
LEFT JOIN Table2 on Table1.Var = Table2.var
where varX .... and VarX.....
Or LEFT JOIN Table2 on Table1.Var = Table2.var and varX= .... and VarX=.....
And the result of these 2 queries are not equal.
In SAS STUDIO, i'ts easy for me to to the second one. But, for the first on, i don't manage to do it. Perhaps, i can use the expression generator but i don't know how to write it.
Can you help me?
Using a current Viya 4 release I could generate the following code:
PROC SQL;
CREATE TABLE WORK.'result'n AS
SELECT
t1.'Name'n,
t1.Sex,
t1.Age,
t1.Height,
t1.Weight
FROM
SASHELP.class t1
INNER JOIN SASHELP.class t2 ON (t1.'Name'n = t2.'Name'n)
WHERE
UPPER(t2.Sex) = 'F'
;
QUIT;
RUN;
Here the flow:
The where clause is based on the filter condition
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.