Chapter Contents |
Previous |
Next |
UNIQUE |
Optional statement | |
Applies to: | view descriptor |
Interacts with: | ASSIGN |
Syntax | |
Details |
Syntax |
UNIQUE <=> YES | NO | Y | N; |
An editing statement, such as UNIQUE, must follow the CREATE statement when you create a view descriptor. See CREATE for more information on the order of statements.
Note: The UNIQUE statement cannot be
used with the UPDATE statement.
The UNIQUE statement is affected by whether you specified the ASSIGN statement when you created the access descriptor on which the view is based, as follows:
ASSIGN=YES
statement, you
cannot specify UNIQUE when creating a view descriptor.
YES
causes the SAS System to generate unique names, so UNIQUE is not necessary.
ASSIGN=NO
, you must resolve any duplicate SAS variable names in the
view descriptor. You can use UNIQUE to generate unique names automatically,
or you can use the RENAME statement to resolve duplicate names yourself.
See RENAME for
information on that statement.
If duplicate SAS variable names exist in the access
descriptor on which you are creating a view descriptor, you can specify UNIQUE
to resolve the duplication. When you specify
UNIQUE=YES
, the SAS/ACCESS interface
appends numbers to any duplicate SAS variable names, thus making each variable
name unique. (See the rules for default SAS names in ASSIGN.)
If you specify
UNIQUE=NO
, the SAS/ACCESS interface
continues to allow duplicate SAS variable names to exist. You must resolve
these duplicate names before saving (and thereby creating) the view descriptor.
Note: It is recommended that you use the UNIQUE statement
and specify
UNIQUE=YES
. If you omit it or specify
UNIQUE=NO
and the SAS System encounters duplicate SAS variable names in a view
descriptor, your job fails.
The equals sign (=) is optional in the UNIQUE statement. UN is the alias for UNIQUE.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.