I would like to insert my file (csv) into a BLOB column (Oracle), I use a Korn Shell script to call an insert sql script via a SQLPLUS statement. my problem is that I don't know how to pass my file as a parameter to retrieve it in my insert script.
Here is a preview of my call in the ksh file :
file_pl_sql = insert_blob.sql
sqlplus $login/$pwd @file_pl_sql "{$directory_name}/{$file_name}"
Here is my insert_blob.sql :
BEGIN
INSERT INTO FILE_BLOB VALUES ('&1')
COMMIT;
END;
/
exit
Here I pass the path and file name to my sql file but my file is not on the database server. I think I have to transcode my file into bytes and transmit the bytes but I have no idea how to do it in ksh and how to retrieve it from my sql file. Thank you for your help.