Your ON join-conditions are not syntactically correct. They should read ON T1.something1 = T2.something2.
best way to understand by making up data and try out various scenarios. This will tremendously increase your knowledge. check with on clause initially then try where clauses. Nothing better than learning by doing.
And while you're doing your tests, as @kiranv_ suggested, also try a solution with sort and data steps, where you do the joins piecemeal.
With larger datasets, the overall performance might surprise you.
Caveat: This is only possible with 1-to-many, not with many-to-many relationships, where SQL is needed for the cartesian join.
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.