Hello ,
I have ORACLE 11g & RHLE 5
I have a procedure which generates a dynamic delete statement and then gets executed and deleted the duplicated data present in the table.
Now the problem is that one of my table consist 30 Lacs + records and when it takes this much amount of data in temporary tablespace for sorting and deleting the data then the TEMP tablespace is not able to handle this situation , as already the temp tablespace is near to full..
Can i modify this code in a format that it should take only 10,000 rows at a time for deletion operation and then the next 10,000 and so on ...
IF P_IN_DIM1='Y' THEN
V_TABLE_NAME:=P_IN_TABLE_NAME||'_1D';
V_QRY := ' DELETE FROM '||TABLE_NAME||' A WHERE A.DATE_TIME < (SELECT MAX(B.DATE_TIME) FROM ' ||V_TABLE_NAME||' B WHERE '||V_FIELD||' AND A.IDX1 = B.IDX1)';
EXECUTE IMMEDIATE V_QRY;
END IF;
Thanks in advance ....