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.
Venkat
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?
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.
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.