BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have a quick question about outer joins in EG. I know that in PROC SQL you can perform an outer join on only two tables at a time (this restriction was stated in the PROC SQL section of the Certification Guide for Advanced Programming). However, in EG I have joined three tables with outer joins without any error messages and the generated PROC SQL code looks fine.

Is the two table restriction for outer joins only a recommendation or has EG been modified to perform outer joins on multiple tables or am I courting disaster by even attempting this type of join?

I don't want to include any table joins that may produce inconsistent results and I am worried that by doing this type of join I may cause problems. Any advice on this situation would be greatly appreciated.

Regards,
Xander
3 REPLIES 3
Patrick
Opal | Level 21
SAS EG is "only" a client. The code is always processed on the SAS Workspace Server. There can't be such a thing like a EG modification allowing to run SAS code which would run otherwise.

How does this EG generated SQL code look like? And does it make sense from a business point of view?

Cheers, Patrick
LinusH
Tourmaline | Level 20
There are no real restriction to two tables in outer joins. Syntactically, you can only name two tables per LEFT|RIGHT JOIN clause. But SAS SQL allows you to nestle these, so that the result of the first join will be input to the next join, which you'll probably have in your SQL. So, EG will most probably produce accurate SQL for you when you use Filter and Query object.


/Linus
Data never sleeps
deleted_user
Not applicable
Thanks for your help - I now understand better how these types of tables are combined in SAS. I have actually rewritten some of the queries to speed up the process time and your insight was helpful.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1753 views
  • 0 likes
  • 3 in conversation