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.

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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