ACCESS Procedure

UNIQUE Statement

Generates SAS variable names based on DBMS column names
Interaction: ASSIGN

Syntax

UNIQUE <=> YES | NO | Y | N;

Required Arguments

YES
causes the SAS/ACCESS interface to append numbers to any duplicate SAS variable names, making each variable name unique.
NO
causes the SAS/ACCESS interface to continue to allow duplicate SAS variable names to exist. You must resolve these duplicate names before saving (and thereby creating) the view descriptor.

Details

The UNIQUE statement specifies whether the SAS/ACCESS interface should generate unique SAS variable names for DBMS columns for which SAS variable names have not been entered.
The UNIQUE statement is affected by whether you specified the ASSIGN statement when you created the access descriptor on which the view is based:
  • If you specified the ASSIGN=YES statement, you cannot specify UNIQUE when creating a view descriptor. YES causes SAS to generate unique names, so UNIQUE is not necessary.
  • If you omitted the ASSIGN statement or specified 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 statement for information.
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.
It is recommended that you use the UNIQUE statement and specify UNIQUE=YES. If you omit the UNIQUE statement or specify UNIQUE=NO and SAS encounters duplicate SAS variable names in a view descriptor, your job fails.
The equal sign (=) is optional in the UNIQUE statement.