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.


SQL joins

From sasCommunity
(Redirected from Joins)
Jump to: navigation, search

SQL joins are the SQL equivalent of DATA Step merges.

The general syntax is as follows. Multiple tables may be joined together in one query, up to 256 [1].

   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.

See also