SQL output to HTML table in email notification - possible? [message #633149] |
Wed, 11 February 2015 11:13 |
|
RGall320
Messages: 1 Registered: February 2015 Location: Pennsylvaia
|
Junior Member |
|
|
Hello. I am working on a notification sent via /usr/ucb/mail. The notification is an anonymous script. Some of the records within the notification are not aligning up nicely. We have the columns for Invoice Number and Invoice Amount.
I am being asked if it's possible to output the records to a HTML table because of the alignment issue.
I am trying the following code:
vfile_buffer := ('<p>And this is my header</p>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('<table border="1">');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('<tr>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('<td>Inv Numtd>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('<td>Invoice Amt</td>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('</tr>');
utl_file.put_line(vfile_handler, vfile_buffer);
for x in my_data
loop
vfile_buffer := ('<tr>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('<td>' || x.invoice_num || '</td>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('<td>' || x.invoice_date || '</td>');
utl_file.put_line(vfile_handler, vfile_buffer);
vfile_buffer := ('</tr>');
utl_file.put_line(vfile_handler, vfile_buffer);
end loop;
vfile_buffer := ('</table>');
utl_file.put_line(vfile_handler, vfile_buffer);
But in the notification, it's showing the actual wordings - - it's not converting to a HTML table.
Any thoughts on if this is possibe?
Thanks!
|
|
|
|