This option applies
only when you create a new table. When you create a table, you assign
the column names by using one of the following methods:
-
To control the case of the column
names, specify columns with the desired case and set PRESERVE_COL_NAMES=YES.
If you use special symbols or blanks, you must set VALIDVARNAME=ANY
and use N-Literals.
-
To enable the DBMS to normalize
the column names according to its naming conventions, specify columns
with any case and set PRESERVE_COL_NAMES=NO.
Note: When you read from, insert
rows into, or modify data in an existing DBMS table, SAS identifies
the database column names by their spelling. Therefore, when the database
column exists, the case of the column does not matter.
For additional information,
see the naming conventions topic in the appropriate data source reference
in the
DataFlux Federation Server Administrator’s
Guide.
Specify the alias PRESERVE_NAMES=
if you plan to specify both the PRESERVE_COL_NAMES= and PRESERVE_TAB_NAMES=
options in your LIBNAME statement. Using this alias saves you some
time when coding.
To use column names
in your SAS program that are not valid SAS names, you must use one
of the following techniques:
-
Use the DQUOTE= option in PROC
SQL and then reference your columns using double quotation marks.
For example:
proc sql dquote=ansi;
select "Total$Cost" from mydblib.mytable;
-
Specify the global system option
VALIDVARNAME=ANY and use name literals in the SAS language. For example:
proc print data=mydblib.mytable;
format 'Total$Cost'n 22.2;
Note that if you are
creating a
table in PROC SQL, you must also include the PRESERVE_COL_NAMES=YES
option. For example:
libname mydblib fedsvr server="d1234.us.company.com"
port=2171 user=user1 pwd=pass1
dsn=oradsn dsnuser=orauser dsnpwd=orapwd;
proc sql dquote=ansi;
create table mydblib.mytable (preserve_col_names=yes) ("my$column" int);
PRESERVE_COL_NAMES=
does not apply to the pass-through facility.