03-08-2012 04:17 PM
I am trying to import tables into SAS from an access database and its giving me an error "Table values exceeds the limit of 32 characters".
This is the code I am using:
Proc import data = 'db0_xyz_edf_erfcbgt_hospital_clinic_rate_xxxx"
out = test
DBMS = Access
database = "C:/.......mdb";
Is thera a way of importing data with a long name. I would appreciate oyur time and help regrading the same.
03-08-2012 05:48 PM
Are you on 9.3? Both the 9.2 and 9.3 documentation state:
When importing Microsoft Access tables, SAS/ACCESS converts the table name to a SAS member name. SAS does not support member names longer than 32 bytes.
However, the 9.3 documentation, link below, indicates that the method will accept up to the MS allowed 64 characters, but will likely truncate the table name to the SAS-allowed 32 characters. It will be useful to know if that is really true in 9.3
If you don't have 9.3 and can post a copy of the file, I'd be glad to test it.
03-09-2012 10:47 AM
@ Art297: Thanks for your reply and willingness to test my file. I dont have SAS 9.3. Is it just not possiblt to do in SAS 9.2? If I upload the file, how would I do it unitl I will not have 9.3?
Is there any other way?
03-08-2012 06:15 PM
Assuming you're on windows with access you can do something like the following to see it.
I don't have SAS to test it at the moment though, so post back if it works.
libname test access 'path to access here';
Then you can navigate test for the table and import using a data step,
set test.'this is my really long name'n;
03-09-2012 01:35 PM
Of course there is
SQL Pass Through Facility.
You are correct, if the table name is more than 32 chars it does not show up and you need to access it using SQL Pass Through.
connect to access(path="C:\Temp\testing.mdb");
create table work.test as
select * from connection to access
(select * from This_is_my_really_long_table_name_with_more_than);
disconnect from access;
09-16-2015 07:22 PM - edited 09-16-2015 07:23 PM
Any methods for dealing with long table names with spaces and/or special characters?