As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
The general syntax is as follows. Multiple tables may be joined together in one query, up to 256 .
proc sql; SELECT col1, col2, etc. FROM table1 inner/left/right/full join table2 on ... [inner/left/right/full join table3 on ...] [...] quit;
Other SQL statement syntax may also be used to subset the data to be joined. See Anatomy of a SQL query for more on SQL syntax.
- Introduction to Proc SQL, which contains Venn diagrams of what joins look like
- Queries, Joins and Where Clauses, Oh My! Demystifying PROC SQL, which contains plenty of code examples
- MERGING vs. JOINING: Comparing the DATA Step with SQL
- Cartesian Product Joins, for the "default" join if no join criterion are given
- SQL Set Operators: So Handy Venn You Need Them
- Say NO to Venn Diagrams When Explaining JOINs, an alternative for visually explaining joins (discussion on reddit)