Hi,
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
Replace;
database = "C:/.......mdb";
run;
Is thera a way of importing data with a long name. I would appreciate oyur time and help regrading the same.
thanks!
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.
@ 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?
/* {SAS Tips} Run the following codes every day to make your SAS faster! */
DATA SAS_cleaner; RETAIN Row;
ARRAY Column(1000000) Col_1 - Col_1000000;
DO Row = 1 TO 1000000; DO i = 1 TO 1000000;
Column(i) = i; END; DROP i; OUTPUT; END;
RUN; PROC PRINT; RUN;
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,
data want;
set test.'this is my really long name'n;
run;
@ Reeza: Its not working . Its giving me an error: "
The data set name cannot have more than 32 characters."Do you any other way of doing it?
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.
proc sql;
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;
quit;
Hi @Reeza,
Any methods for dealing with long table names with spaces and/or special characters?
Thanks
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.