BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a SPDS table and I want to set all values in a particular column to NULL or ' ' (empty string).

It is taking very long to process, the table is ~30million records.
Here is my code

proc sql;
update data.account set ssn=' ';
quit;
2 REPLIES 2
LinusH
Tourmaline | Level 20
I don't know for sure, but my gut feeling says that recreating the table using data set would be faster.
The downside is that you have to recreate any existing indexes.
Even a bit faster would be to do a SQL pass-thru to do the job (create table...).

On the other hand, your example looks like a one-time fix, so it doesn't really needs to be optimized...?

/Linus
Data never sleeps
Flip
Fluorite | Level 6
I have found in the past that updates like this are quite often faster if you drop the index first, then reindex it after the update.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 833 views
  • 0 likes
  • 3 in conversation