Chapter Contents |
Previous |
Next |
The SQL Procedure |
PROC SQL <option(s)>; |
To do this | Use this option | |
---|---|---|
Control output | ||
Double-space the report | DOUBLE|NODOUBLE | |
Write a statement to the SAS log that expands the query | FEEDBACK|NOFEEDBACK | |
Flow characters within a column | FLOW|NOFLOW | |
Include a column of row numbers | NUMBER|NONUMBER | |
Specify whether PROC SQL prints the query's result | PRINT|NOPRINT | |
Specify whether PROC SQL should display sorting information | SORTMSG|NOSORTMSG | |
Specify a collating sequence | SORTSEQ= | |
Control execution | ||
Allow PROC SQL to use names other than SAS names | DQUOTE= | |
Specify whether PROC SQL should stop executing after an error | ERRORSTOP|NOERRORSTOP | |
Specify whether PROC SQL should execute statements | EXEC|NOEXEC | |
Restrict the number of input rows | INOBS= | |
Restrict the number of output rows | OUTOBS= | |
Restrict the number of loops | LOOPS= | |
Specify whether PROC SQL prompts you when a limit is reached with the INOBS=, OUTOBS=, or LOOPS= options | PROMPT|NOPROMPT | |
Specify whether PROC SQL writes timing information to the SAS log | STIMER|NOSTIMER | |
Specify how PROC SQL handles updates when there is an interruption | UNDO_POLICY= |
Options |
Default: | NODOUBLE |
Featured in: | Combining Two Tables |
With DQUOTE=SAS, values within quotes are treated as strings.
Default: | SAS |
NOERRORSTOP instructs PROC SQL to execute the statements and to continue checking the syntax after an error occurs.
Default: | NOERRORSTOP in an interactive SAS session; ERRORSTOP in a batch or noninteractive session |
Interaction: | This option is useful only when the EXEC option is in effect. |
Tip: | ERRORSTOP has an effect only when SAS is running in the batch or noninteractive execution mode. |
Tip: | NOERRORSTOP is useful if you want a batch job to continue executing SQL procedure statements after an error is encountered. |
Default: | EXEC |
Tip: | NOEXEC is useful if you want to check the syntax of your SQL statements without executing the statements. |
See also: | ERRORSTOP option |
This option expands any use of an asterisk (for example,
SELECT *
) into
the list of qualified columns that it represents. Any PROC SQL view is expanded
into the underlying query, and parentheses are shown around all expressions
to further indicate their order of evaluation.
Default: | NOFEEDBACK |
Default: | NOFLOW |
Tip: | This option is useful for debugging queries on large tables. |
See also: | Using Macro Variables Set by PROC SQL |
Default: | NONUMBER |
Featured in: | Joining Two Tables |
Default: | |
Tip: | NOPRINT is useful when you are selecting values from a table into macro variables and do not want anything to be displayed. |
Default: | NOPROMPT |
Default: | NOSORTMSG |
See also: | SORTSEQ= option in SAS Language Reference: Dictionary. |
Default: | NOSTIMER |
This option may enable other users to update newly inserted rows. If an error occurs during the insert, PROC SQL can delete a record that another user updated. In that case, the statement is not executed, and an error message is issued.
Default: | REQUIRED |
Note: Options can be added, removed, or
changed between PROC SQL statements with the RESET statement.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.