Validating Query Syntax
Overview
When you are building a PROC
SQL query, you might find it more efficient to check your query without
actually executing it. To verify the syntax and the existence of columns
and tables that are referenced in the query without executing the
query, use either of the following:
-
the NOEXEC option in the PROC SQL statement
-
the VALIDATE keyword before a SELECT statement.
Consider how you specify
the NOEXEC option and the VALIDATE keyword, and examine the minor
differences between them.
Using the NOEXEC Option
The NOEXEC option is specified in
the following PROC SQL statement:
proc sql noexec;
select empid, jobcode, salary
from sasuser.payrollmaster
where jobcode contains 'NA'
order by salary;
If ...
Get SAS Certification Prep Guide, 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.