Chapter Contents

Previous

Next
SAS/ACCESS Software for Relational Databases: Reference

SAS Variable Names to DBMS Column Names

The following two tables describe how SAS variable names are handled when you use SAS/ACCESS software to create DBMS objects such as tables and views. This information applies generally; see your DBMS chapter for possible exceptions. See Naming Examples for examples that illustrate the different kinds of naming actions and defaults.

SAS Data Set to DBMS Column Names
If the SAS variable name as input is ... ...And you want this DBMS column name... ...Then use these LIBNAME,
PROC SQL, or System Options (table note 1)

Any SAS variable name, such as Miles Default DBMS column name (normalized to follow the DBMS's naming conventions), such as

MILES

preserve_col_names=no
A case-sensitive SAS variable name, such as Miles Case-sensitive DBMS column name, such as Miles preserve_col_names=yes
A SAS variable name with characters that are not valid in a normalized SAS name, such as Miles-to-Go Case-sensitive DBMS column name that matches the SAS name, such as Miles-to-Go proc sql dquote=ansi and preserve_col_names=yes or, in a DATA or PROC step, use a SAS name literal and preserve_col_names=yes validvarname=any

TABLE NOTE 1:  

These options might not be required. Option default values are DBMS-specific. [arrow]

SAS Data Set to DBMS Table Names
If the SAS data set name as input is... ...And you want this DBMS table name... ...Then use these LIBNAME or
PROC SQL Options (table note 1)
Any SAS data set name, such as Payroll Default DBMS table name (normalized to follow the DBMS's naming conventions), such as PAYROLL preserve_tab_names=no
A case-sensitive SAS data set name, such as Payroll Case-sensitive DBMS table name, such as Payroll preserve_tab_names=yes
A case-sensitive SAS data set name with characters that are not valid in a normalized SAS name, such as Payroll-for-QC Case-sensitive DBMS table name that matches the SAS name, such as Payroll-for-QC proc sql dquote=ansi and preserve_tab-names=yes or, in a DATA or PROC step, use a SAS name literal and preserve_tab_names=yes

TABLE NOTE 1:  

These options might not be required. Option default values are DBMS-specific. [arrow]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.