BookmarkSubscribeRSS Feed
Pooja98
Fluorite | Level 6
Can anyone share the study material for macros and sql ???
2 REPLIES 2
Reeza
Super User

For Macros:

 

UCLA introductory tutorial on macro variables and macros
https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/

Tutorial on converting a working program to a macro
This method is pretty robust and helps prevent errors and makes it much easier to debug your code. Obviously biased, because I wrote it 🙂 https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md

Examples of common macro usage
https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Ap...

 

LexJansen - user written papers and tutorials

https://www.lexjansen.com/search/searchresults.php?q=macro%20tutorials

 

SQL

I'd recommend the Kaggle SQL course first (free) or W3Schools or FreeCodeCamp and then learn how to use it in SAS specifically.

https://www.freecodecamp.org/news/sql-and-databases-full-course/

FreelanceReinh
Jade | Level 19

For PROC SQL I recommend Howard Schreier's excellent book PROC SQL by Example: Using SQL within SAS® (from which I learned it), especially if you already know some DATA step programming. The latter is also assumed for Christianna S. Williams's paper PROC SQL for DATA Step Die-hards (which I used back then as well).

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 807 views
  • 2 likes
  • 3 in conversation