982193 wrote:You an use EXTERNAL TABLE (Or SQL Loader, if the file cannot be moved to the DB server) to read from a file and it can be used in your DELETE statements just as a normal table.
I was trying to delete records from database day by day and commit. Is it possible to pick the dates from file and then delete the database record for that day. Something like below.
For day IN <File.txt>LOOP is a bad idea.. You could do it in a single statement..
delete from table where date = '<1st value from File.txt>';
And COMMIT inside LOOP is again not a good idea..
delete from table where date in (select the_date_coumn from the external_table);