I'm trying to get data from an Access 2007 database. The field is text and can be 2000 characters long.
SAS is truncating the field to 1024 chars.
What is the correct way of importing this table so that the field length is preserved?
What I'm doing now is creating a libname using odbc to connect to the Access db.
When I "View Columns" in the table in Explorer window in SAS for the Access library, it shows the length of the field as 1024.
Use the Access Engine as in :
libname ac Access "myDatabase.accdb" DBMAX_TEXT=2048;
from SAS doc:
DBMAX_TEXT= integer between 1 and 32,767
specifies the maximum length for a character string. Character strings longer than 32,767 are truncated. This option only applies when you are reading, appending, and updating character data in a Microsoft Access database or Microsoft Excel workbook from SAS.
Default:1,024
PG
Use the Access Engine as in :
libname ac Access "myDatabase.accdb" DBMAX_TEXT=2048;
from SAS doc:
DBMAX_TEXT= integer between 1 and 32,767
specifies the maximum length for a character string. Character strings longer than 32,767 are truncated. This option only applies when you are reading, appending, and updating character data in a Microsoft Access database or Microsoft Excel workbook from SAS.
Default:1,024
PG
Excellent. Thank you.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.