Previous Page | Next Page

The ACCESS Procedure for Relational Databases

RENAME Statement


Modifies the SAS variable name
Applies to: access descriptor or view descriptor
Interaction: ASSIGN, RESET

RENAME <'>column-identifier-1<'> <=> SAS-variable-name-1 <...<'>column-identifier-n<'> <=> SAS-variable-name-n>;

column-identifier

specifies the DBMS column name or the positional equivalent from the LIST statement, which is the number that represents the column's place in the descriptor. If the column name contains lowercase characters, special characters, or national characters, enclose the name in quotation marks. The equal sign (=) is optional.

SAS-variable-name

specifies a SAS variable name.


Details

The RENAME statement sets or modifies the SAS variable name that is associated with a DBMS column.

Two factors affect the use of the RENAME statement: whether you specify the ASSIGN statement when you are creating an access descriptor, and the type of descriptor you are creating.

For example, to rename the SAS variable names that are associated with the seventh column and the nine-character FIRSTNAME column in a descriptor, submit this statement:

rename
7 birthdy  'firstname'=fname;

When you are creating a view descriptor, the RENAME statement automatically selects the renamed column for the view. That is, if you rename the SAS variable associated with a DBMS column, you do not have to issue a SELECT statement for that column.

Previous Page | Next Page | Top of Page