08-11-2014 09:02 AM
I need to delete few records in an oracle table from a SAS program directly.
My program is below,
libname abc oracle path=path1
schema=schema1 user=user11 password=XXXXXXXX readbuff=10000;
delete from abc.table1 where flag='T';
Is the above logic will work?
Do we need to give commit statement?
08-11-2014 09:30 AM
TBH I have not used the libname statement to do these things. I would write it (may need to check syntax):
connect to oracle (...);
execute by oracle(delete ...);
execute by oracle(commit);
Can check the operation in Toad or Oracel Dev to see what works, then copy the code over into the SQL statement. Other questions include: do you have permission to do this? Is this a wise thing to be doing - I would suggest that removing data would be better off going through the OC system rather than via third party.
08-11-2014 10:40 AM
Yes... I have access to do this activity.
I am not sure, whether this way will be an efficient one, and so i posted here to get the suggestion on this.
What is OC?
08-11-2014 03:40 PM
Your code looks to have correct syntax.
There are SAS options to control COMMITS but usually experimentation is required to optimise the right number. The RW9 solution may give you better control.