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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1241 views
  • 0 likes
  • 3 in conversation