I use Oracle sqlplus "set markup html on" to quickly convert query output into HTML report -
It's very simlpe way to publish database report online.
I'm missing however one thing - alternating colors for every other row, This is especially helpful while viewing wide reports.
is there any way to embed HTML color for every row, like make it dependent on mod(rownum/2) - even/odd row number ?
thank you !
I don't think there is, using SET MARKUP HTML ON. You would have to write your own markup something like:
select '<tr style="color:'
|| CASE mod(rownum,2) WHEN 0 THEN 'red' ELSE 'green' END
|| '"><td>' || ename || '</td></tr>' data
from
( select ename from emp order by ename );
Then add the surrounding table tags using PROMPTs or whatever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With