Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generate SQL queries in HTML File with PL/SQL

MoonlightOct 25 2021

Hello,
I would like to generate SQL queries results into HTML file with PL/SQL program... so I developped the script below .... But it's not working ☹️ ... Any one know how to do that?
declare
html_file utl_file.file_type;
re clob;
begin
html_file:=utl_file.fopen ('TEST_DIR', 'html_test.html', 'W');
SELECT '<HTML>
<title> Database Parameter </title>
<table cols="3" border=2>
<tr><th>Param_Name</th><th>Param_Value</th></tr>
<tr><td> '||name||' </td><td> ' ||value||' </td></tr>
</table>
</HTML>' into re
FROM v$parameter
where name in ('spfile','controle_files','instance_name';
utl_file.put_line(html_file,re );
end;

Thank you.

This post has been answered by Paulzip on Oct 25 2021
Jump to Answer

Comments

Post Details

Added on Oct 25 2021
4 comments
524 views