Skip to Main Content

APEX

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!

HTML in SQL Query

Alter BoyAug 16 2018 — edited Aug 16 2018

Hello,

Is there a way to get HTML in my query? I'm using a tabular form, retrieving data from a table, and if for one column, is_completed, is 'yes' (0) I want the background of that cell to be green, and red for 'no' (1). My code is something like this:

select

....

case

when is_completed = 0 then '<span style:"background-color:green">' || is_completed || '</span>'

when is_completed = 1 then '<span style:"background-color:red">' || is_completed || '</span>'

end as is_completed,

....

from table1

However, in the table, it comes out as that exact text. Like the display value is "<span style:"background-color:green">' || Yes || '</span>"

Any solution to this?

Thanks,
Matthew

This post has been answered by PMON on Aug 16 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2018
Added on Aug 16 2018
4 comments
2,057 views