I want to clear the table from all data (Table_with_DB (it is in program sqldeveloper)) through sqlplus and based on filenames in the path (path/to/files) using SQLPlus completes the table (Table_with_DB) the filenames that are in the path.
I create 2 separate SQL files (clear.sql ; register.sql)
and 1 with bash (bashloop.sh)
clear.sql
BEGIN
package.clear('Table_with_DB');
END;
register.sql
BEGIN
package.register('folderName' , '&1);
END;
bashloop.sh
for i in path/to/files;
do
sqlplus -s userid/password@ @clear.sql
sqlplus -s userid/password@ @register.sql
done
I expect the query clear Table_with_DB and transfer the filenames from path/to/files to Table_with_DB using SQLPlus
but the actual it not work :(