Expressions Listed by Product

Base SAS

C Q

Name
Syntax and Description
CASE <case-operand>
WHEN when-condition THEN result-expression
<WHEN when-condition THEN result-expression ...>
<ELSE result-expression>
END
Selects result values that satisfy specified conditions.
Product: Base SAS
Document: SAS Viya Workbench: SQL Procedure User’s Guide
table-expression-1 <set-operator table-expression-2> <set-operator table-expression-3 ...>
Retrieves data from tables.
Product: Base SAS
Document: SAS Viya Workbench: SQL Procedure User’s Guide

SAS Federation Server

< C N

Name
Syntax and Description
::=
constant
| <alias> column
| function
| (scalar-subquery)
| ()
| {operator | predicate}
Produces a single value from a combination of symbols and operators or predicates.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
CASE <case-expression>
WHEN when-expression THEN result-expression
...
<WHEN when-expression THEN result-expression>
<ELSE result-expression>
END
Selects result values that satisfy search conditions and value comparisons.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
COALESCE(expression <, …expression>)
Returns the first non-null value from a list of columns.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
NULLIF(expression-1, expression-2)
Returns a null value if the two specified expressions are equal; otherwise, returns the first expression.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
Last updated: June 5, 2026