Ive been struggling to work out how I can delete the rows from the RENTALLINE_ID in RENTALLINE_1 and then delete RENTAL_ID from the RENTAL_1. I have the select statement which finds the exact values I want to delete. It finds the records older than 3 years. I am using SQLPlus with command line interface.
select rentalline_1.rentalline_ID,
rentalline_1.tool_store_id,
rentalline_1.rental_id,
rentalline_1.qty,
rental_1.datein
from rental_1
inner join rentalline_1 on rental_1.rental_id = rentalline_1.rental_id
where MONTHS_BETWEEN (SYSDATE, DATEIN) > (36)
Thanks in advance for any help!
I can’t test on an oracle database here, but I would expect
you could also give it a swing with