Hi,
Hi I am Trying to fetch a BLOB column
I am Trying to fetch a BLOB column from a table and send out an email with BOLB file as an attachment through the shell script.
However my script is failing for some reason.Kindly help me in this regard.
Below is the sudo code.
VATT=`sqlplus -s $P_Login<< !EOF
set feedback off;
set echo on;
set verify on;
set pages 0
set serveroutput on size 1000000
set linesize 10000
DECLARE
l_image BLOB;
BEGIN
SELECT ATTACHMENT
INTO l_image
FROM table
WHERE 1=1
AND PROCESS_ID='$p_process_id';
EXCEPTION
WHEN OTHERS THEN dbms_output.PUT_LINE('*****Error is : '||sqlcode ||' '||sqlerrm);
END;
/
exit;
!EOF`
echo -e "$p_email_body" | mutt -s "p_subject $v_sid " $p_to_email -a $VATT".pdf"
Thanks you advance!
Regards,
SAM