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-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!

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