Notice: get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /home/dbascrip/public_html/wp-includes/functions.php on line 3828
who never needed to export data to excel from sqlplus ? everybody had one day needed to do that.
Sqlplus support the HTML markup which provides an excellent result once opened in excel.
With the HTML markup, sqlplus create a table with all columns from your query including the name of your columns as table header.
Here is a small exemple:
SET MARKUP HTML ON ENTMAP ON PREFORMAT OFF ;
select to_char(end_time,'hh24:mi:ss') as sample_time,
where end_time between sysdate - interval '1' hour and sysdate
and group_id = 2
and metric_name = 'Host CPU Utilization (%)'
order by metric_name, end_time;
my output file has already the xls extension, I just have to open it, here is how it looks like:
from there it is easy to generate a chart for example:
Thanks for reading.