Hello,
I am using ORACLE Database 11g and RHEL 5.
I have a procedure in my database which will update the required table for one value, which users passes from the front end (Java).
Now i want to modify it to update multiple records in "BULK".
I have studied the SQL Loader and know about it. But this time i don't want to insert excel data into an oracle table , though i want to pass the excel data to a procedure as a parameter. Also want to do this process in a BULK mode.
Below is a sample code which take input for one value from front end and updated the table ...
PROCEDURE TAB_UPDATE (SYMBOL IN SYMBOL_INDEX.SYMBOL%TYPE,
END_DATE IN SYMBOL_INDEX.END_DATE%TYPE)
IS
BEGIN
V_QRY1 := '';
V_QRY2 := '';
V_QRY1 := 'UPDATE SYMBOL_INDEX';
V_QRY2 := 'SET END_DATE = '''||END_DATE||''' WHERE SYMBOL_IDENTIFIER = '''||SYMBOL||''' AND END_DATE IS NULL';
PRO_EXEC(V_QRY1,V_QRY2);
EXCEPTION
-----------
END TAB_UPDATE ;
Now this simple plsql procedure code updates one record at a time ,each time the user has to insert a new value from front end to update its value.
Please suggest me how can i make this procedure to take parameter value from an excel sheet and also update all the records in BULK.
Should i use varrays ? if possible please provide some useful links or sample code ...
Thanks in advance !!!