Monday, February 19, 2007

Learn something new everyday

I was testing various things in sql developer and you'd think I'd know what's in there but not so. As most people know sql developer uses swing for the UI. Swing components allow you to render the content as html. This is really easy for example a JLabel.setLabel('<html><b>hi') will bold the text hi. The limitation is it's html 3.2 in java 1.5.

So I tried this:

select '<html><b>'||dummy from dual;
select '<html><i>'||dummy from dual;
or maybe more useful:
select '<html><i>'|| object_name object_name,
'<html><b>'|| object_id object_if,
decode(status,'VALID',null,'<html><font color="red"><u>')||status status
from user_objects

And here's what the last one looks like:

No comments: