SQLXRC macro variable 164
statistical functions 389
statistical summaries 56, 360
statistics
based on number of arguments 362
STIMER option 230
timing SQL procedure 140
STOPONTRUNC option 230
string comparison operators
truncated 354
Structured Query Language
See SQL
subqueries 96, 354
combining with joins 101
compared with joins 341
comparing with joins 143
correlated 357
correlated subqueries 98
efficiency and 358
multiple nesting levels 100
multiple-value 97
returning rows 325
single-value 96
testing for existence of a group of
values 99
when to use 102
subsetting data 262, 265
SUBSTRING function 359
subtotals
computing percentages within 185
SUM function
summarizing data 58
summarizing data 56
aggregate functions 56
aggregate functions with unique values
61
aggregate functions, using 56
combining data from multiple rows into
single row 59
displaying sums 58
in multiple columns 192
remerging summary statistics 59
SQL procedure 361
with missing values 62
with WHERE clause 57
summary functions
See also aggregate functions
disabling remerging of data 146
summary reports
creating 194
summary statistics
remerging 59
summary-function component 360
counting rows 362
remerging data 363
statistics based on number of arguments
362
summarizing data 361
sums
displaying 58
syntax checking 139
SYS_SQLSETLIMIT macro variable 385
T
table aliases 262, 329
abbreviating column names 76
inner joins 76
table definitions 247
table expressions 344
table-expression component 368
tables 4
See also PROC SQL tables
Cartesian product 75
comparing 180
copying 115
counting duplicate rows 187
creating 112
creating from column definitions 112
creating from query results 113
creating with data set options 115
creating with macros 161
creating without rows 112
creating, like an existing table 115
DBMS tables 4
deleting 128
example tables 7
expanding hierarchical data 189
inserting rows 116
integrity constraints 129
joining a table to itself 83
omitting ORDER BY clause when
creating 143
selecting all columns 22
selecting columns 22
selecting specific columns 23
SQL tables in other procedures 208
SQL tables in SAS 128
structure of 27
temporary tables versus in-line views
143
update errors 122
updating all rows with same expression
120
updating conditionally 200
updating rows with different
expressions 121
updating values 120
updating with values from another table
203
temporary tables
Index 467

Get SAS 9.4 SQL Procedure User's Guide, Fourth Edition, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.