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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.