Sunday, January 6, 2008

SAS SQL Section

Proc SQL is probably the most powerful data management (subsequent to creation, usually) tool SAS has. I say this because with this one PROC you can mostly manage your data step for

(1) creating a dataset
(2) selecting specific variables from datasets that are coming together through PROC SQL
(3) selecting vars and their values as macro variables
(4) from specific sas data sets
(5) merging (joining) sas datasets
(6) doing case analysis (before posting the data into the new dataset)
(7) subseting observations with a "where" condition
(8) grouping observations by certain conditions
(9) ordering observations by a certain variable

Here are some basic references:

Section: SAS SQL:

SAS SQL has some special advantages; before you know that let us understand how to do the same thing in standard SAS codes and SAS SQL codes

A nice SAS SQL basics notes with examples

Top 10 SAS SQL examples:

http://www2.sas.com/proceedings/sugi29/042-29.pdf

A great simple SAS SQL teaching document

http://www.pauldickman.com/teaching/sas/proc_sql_code_20041026.pdf

A nice article about INTO Clause

http://www.ats.ucla.edu/stat/sas/library/nesug98/p193.pdf

Undocumented and Hard to find SQL Features

http://www2.sas.com/proceedings/sugi28/019-28.pdf

Part of this new book - Proc SQL: Beyond the Basics Using SAS - By Kirk Paul Lafler where a great collection of codes (To make sense you may benefit well buying the book - look at SAS site for the book)

http://www.sas.com/samples/A58316

No comments: