sqlplusspool

SQLPlus Spool Append


I am using a sqlplus script to generate a spool file without any issues. The file generated is html. It generates a table as shown below. I would like to add a text before the table as shown below "Alert Description"

enter image description here

Below is the code I am running. I am not sure where I can add the Alert Description to the Spool File or script. Any help will be appreciated.

SET LINESIZE 32767;
SET PAGESIZE 32767;
SET FEEDBACK OFF
SET MARKUP HTML ON SPOOL ON
SPOOL D:\ALERT_RETURNS.html ;
Select a, b, c, d
        From
           Table
Where
            rs.RUN_DATE >= sysdate - 15/1440
/
spool off;
exit;

Solution

  • I used the prompt which will add a text as needed.