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

Hi Gurus,

 

I have a oracle DB and trying to keep a subset of its data and store it in Sas7dat, one issue is that the oracle b may change the record ( e.g. invoice from valid to cancel) and i need to do incremental update (considering indexing apply)  , are there any efficient way to check if there is any update need in the current sas dataset and how to do the update in best practice?

 

Thanks guys

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

The key here would be identifying any changed records in your Oracle table. Does it contain a "last updated date" column for example. If so it would be easy to extract a subset of the rows that have changed since the SAS table was last updated, then update the SAS version.

 

I also assume you will need to track additions and deletions. Additions can be identified by querying any rows added since the last updated date. Deletions will depend on whether these are kept in your data and marked as "closed/deleted" - easy - or are actually physically deleted - this would be a lot harder to track.

 

 

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

The key here would be identifying any changed records in your Oracle table. Does it contain a "last updated date" column for example. If so it would be easy to extract a subset of the rows that have changed since the SAS table was last updated, then update the SAS version.

 

I also assume you will need to track additions and deletions. Additions can be identified by querying any rows added since the last updated date. Deletions will depend on whether these are kept in your data and marked as "closed/deleted" - easy - or are actually physically deleted - this would be a lot harder to track.

 

 

LinusH
Tourmaline | Level 20
It sounds tedious to keep two data sets in sync like this. Why do you need a copy in SAS?
Your Oracle DBA should be able to tell you if/how to get delta records.
Data never sleeps

sas-innovate-2024.png

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.

 

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
  • 2 replies
  • 987 views
  • 1 like
  • 3 in conversation