BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Gateux
Calcite | Level 5

I have a table with 87 columns and 3,924,060 rows, which I am trying to export as MDB Access File with PROC EXPORT (DBMS = ACCESS REPLACE).

The PROC EXPORT settings should be correct as the code works correctly with other tables, however, with this one, SAS stops with this error:

 

ERROR: Execute: Unable to insert row
WARNING: File deletion failed for _IMEX_.MyDataTable.DATA.
ERROR: Export unsuccessful.  See SAS Log for details.

The .mdb file produced is little more than 2gb in size, with exactly 2,621,000 rows. I can see that some variables, which are obviously integers, are exported as double. This can be the cause that file is larger than it should be.

 

Also, I don't see a reason why should have SAS problem with exporting big table into ACCESS.

 

I should note that I work with 32bit version of SAS 9.4, Windows 7, MS Office 2013. (Problem persists also with 64bit SAS).

 

So I have two questions:

 

* Can I force SAS to export variable into Access as Integer, not as double?

* Why does SAS in some point stop exporting the data?

 

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Access itself has limitations (its what comes from using a mickey mouse database):
http://webcheatsheet.com/SQL/access_specification.php

 

Most likely your hitting one of those limits.  For that kind of data I would strongly advise you to use another datasource/database.

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Access itself has limitations (its what comes from using a mickey mouse database):
http://webcheatsheet.com/SQL/access_specification.php

 

Most likely your hitting one of those limits.  For that kind of data I would strongly advise you to use another datasource/database.

Kurt_Bremser
Super User

@Gateux wrote:

I have a table with 87 columns and 3,924,060 rows, which I am trying to export as MDB Access File with PROC EXPORT (DBMS = ACCESS REPLACE).

The PROC EXPORT settings should be correct as the code works correctly with other tables, however, with this one, SAS stops with this error:

 

ERROR: Execute: Unable to insert row
WARNING: File deletion failed for _IMEX_.MyDataTable.DATA.
ERROR: Export unsuccessful.  See SAS Log for details.

The .mdb file produced is little more than 2gb in size, with exactly 2,621,000 rows. I can see that some variables, which are obviously integers, are exported as double. This can be the cause that file is larger than it should be.

 

Also, I don't see a reason why should have SAS problem with exporting big table into ACCESS.

 

I should note that I work with 32bit version of SAS 9.4, Windows 7, MS Office 2013. (Problem persists also with 64bit SAS).

 

So I have two questions:

 

* Can I force SAS to export variable into Access as Integer, not as double?

* Why does SAS in some point stop exporting the data?

 

Thank you

 


From https://www.mrexcel.com/forum/microsoft-access/687514-access-32bit-vs-64bit.html I take it that 32-bit Access has a filesize limitation of 2GB.

For data interchange, I always (and most of the senior users her also do) prefer a text-based file format, either some kind of character-separated, or fixed column width. Files like that can be read by any application, and you don't have to rely on how good one piece of software understands the quirks of another.

Gateux
Calcite | Level 5

Thank you for suggestions. Regarding the form of the output - I am limited by the company process, so .mdb must be preserved.

 

I have found that I can shrink the size of the output by adjusting the formats of the variables (obviously, when the format of numeric variable is for example BEST12., it is read into Access as 'double', but after converting format to 8., Access reads it as 'integer'). 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2070 views
  • 0 likes
  • 3 in conversation