I am new user to this community and new to database PLSQL coding also. I have requirement to write a stored procedure to truncate/delete the records from the existing tables. we have 9 tables which loaded on daily basis using oracle package(ETL) and every time it loads ,Load id will be inserted in the all the tables. This is the existing setup now.
My requirement now is:
1. I need to write stored procedure which ask user to select input parameter to truncate all the records or to delete sepecific load ID records .( Based on the user choice)
a. If User select option one (full) i need to truncate all tables - so i can write truncate
block of code for this.
b.If user select option 2 which is partial then it should ask again which load id you want
to delete. Based on the load id i will delete the records in all the tables.
I need syntax to derive this code. we need to promote this code to production in another 2 weeks. Friends, could you please help me to write this code. Please let me know if i need to explain more on this.