![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/ACCESS Software for Relational Databases: Reference |
In Version 7 of the SAS System, SAS variable names and member
names can be up to 32 characters long. Column names can be case-sensitive
also. Some DBMSs allow case sensitive column and table names as well as names
with special characters such as an Oracle column named
Amount Budgeted$. Therefore, special consideration
should be used when the names of DBMS objects, such as tables and columns,
are used with SAS/ACCESS and the SQL Procedure Pass-Through Facility. See
your DBMS chapter for more information about the SAS System and how it interfaces
with your DBMS names.
When your DBMS engine is reading column names that do
not conform to the SAS naming conventions, unsupported characters, such as
spaces, are replaced with underscores (_). This is the default behavior. For
example, the column name
Amount Budgeted$ becomes the SAS variable
name
Amount_Budgeted_. If the DBMS name is longer than
32 characters, then the name is truncated. If necessary, numbers are applied
to the end of the name to make it unique. See The DQUOTE=ANSI PROC SQL Option to override this default renaming algorithm.
proc sql;
connect to oracle (user=testuser pass=testpass);
create view myview as
select * from connection to oracle
(select "Amount Budgeted$", "Amount Spent$"
from mytable);
quit;
proc contents data=myview;
run;
See SAS Names and Support for DBMS Names for more information about SAS names and DBMS names.
| The DQUOTE=ANSI PROC SQL Option |
proc sql dquote=ansi;
connect to oracle (user=testuser pass=testpass);
create view myview as
select "Amount Budgeted$", "Amount Spent$"
from connection to oracle
(select "Amount Budgeted$", "Amount Spent$"
from mytable);
quit;
proc contents data=myview;
run;
You also can use the global system option VALIDVARNAME= ANY to override the SAS naming conventions. See SAS Names and Support for DBMS Names for more information.
See SAS Names and Support for DBMS Names for more information about SAS names and DBMS names.
| Version 6 Names Compatibility |
options validvarname=v6;
proc sql;
connect to oracle (user=testuser pass=testpass);
create view myview as
select amount_b amount_s
from connection to oracle
(select "Amount Budgeted$", "Amount Spent$"
from mytable);
quit;
options validvarname=v6;
proc contents data=myview;
run;
See SAS Names and Support for DBMS Names for more information.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.