From the course: SAS® 9.4 Cert Prep: Part 07 Using SQL in SAS

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Demo: Joining tables with PROC SQL

Demo: Joining tables with PROC SQL

- [Instructor] We're going to use PROC SQL to perform an inner join between two tables so let's take a look at those tables first. We'll start with STORM_SUMMARY. Remember, we have one row per storm and we have these raw basin codes. We even have some case inconsistencies with basin sometimes being in lowercase. In another table, STORM_BASINCODES, this is what I would call a lookup table. We have the basin codes as well as the full basin name. So what I'd like to do is join these tables together so that basically this BasinName column would be added to STORM_SUMMARY so I could identify the storms based on the full Basin name rather than just the two letter code. So to accomplish this, we can use PROC SQL. The initial query that we're starting with selecting Season, Name, Basin, and MaxWindMPH from the STORM_SUMMARY table. We're sorting by Season in descending sequence and Name and creating a report. So I'll run…

Contents