Hi ,
Need some advice on which type of methods can be used to efficiently and quickly delete a couple million rows in Oracle from SAS.
Some errors see during the course of action below.
Error received on SAS - “ERROR: Update/delete failed. The observation may have been changed or deleted since the time it was read. ORACLE execute error:
ORA-08177: can't serialize access for this transaction.
ERROR: ROLLBACK issued due to errors for data set XYZ
NOTE: Deletes were rolled back by the DBMS software.”
Hi,
You can use a Proc SQL:
Proc sql;
connect to oracle(user=yourusername pass=yourpass path=bd);
execute (truncate table yourtable)
by oracle;
quit;
Laurent
Hi,
You can use a Proc SQL:
Proc sql;
connect to oracle(user=yourusername pass=yourpass path=bd);
execute (truncate table yourtable)
by oracle;
quit;
Laurent
Do you want to delete tables, or rows in tables?
If you have the appropriate rights, drop table would work, can't see if you can optimize that.
If you want to delete rows effectively, that's more of an Oracle DBA question. Once you know the Oracle syntax, you might want to discover of you can achieve that using implicit SQL pass-thru from SAS.
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.