BookmarkSubscribeRSS Feed
sasuser77
Calcite | Level 5

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

3 REPLIES 3
Reeza
Super User

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?

LinusH
Tourmaline | Level 20
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1689 views
  • 0 likes
  • 4 in conversation