DATA Step, Macro, Functions and more

Efficient way to Update/Insert MS Access 2007 Database using SAS

Reply
Occasional Contributor
Posts: 17

Efficient way to Update/Insert MS Access 2007 Database using SAS

Hi,

 

I want to know the efficient way to update Access 2007 table using sas. Currently I am trying to delete entire records based on a Key field and re-insert the data. 

 

Is there a alternate way to update data if there exists a key, otherwise insert to the table. I found below thread for SQL server, want to see how this can be implemented in Access.

 

https://communities.sas.com/t5/SAS-Procedures/Efficiently-updating-Sql-server-Table-using-SAS-Datase...

 

Venkat

Super User
Posts: 17,851

Re: Efficient way to Update/Insert MS Access 2007 Database using SAS

The difference here is that the is SQL Pass Through - the query is passed to the DB so it ends up using the DB SQL, not SAS SQL. Also, the work happens on the server directly which is faster. 

 

You don't have the flexibility with Access since it's also local so you won't see the same type of improvements. 

 

If you're connecting to the Access table, have you tried using an UPDATE or MODIFY statement instead?

Super User
Posts: 5,257

Re: Efficient way to Update/Insert MS Access 2007 Database using SAS

Do you have any performance issues?
Step 1 is to understand how to tune the Access update, and that part is probably best answered elsewhere. Then investigate how that soon to know method is accomplished by using SAS.
Data never sleeps
Super User
Posts: 6,946

Re: Efficient way to Update/Insert MS Access 2007 Database using SAS

Since Access is just a DB-lookalike for office purposes, I'd load the Access table into SAS, do the update there, and recreate the Access file.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 3 replies
  • 148 views
  • 0 likes
  • 4 in conversation