Search code examples
oracle-databaseoracle11goracle-sqldeveloper

Oracle SQL Developer - How to Display Percents using Color (Not Numbers)


While working out of Oracle SQL Developer I came across a feature that I was unaware of until today. The feature is to display Percentages using colors not unlike how a horizontal bar chart could display the same percentages. I found it by right clicking on the connection and choosing the option 'Manage Database'.

Is this feature available for ANY query/report where percentages are being displayed? The column I'm referring to in the screenshot is the 'Percent_Used' column.

enter image description here


Solution

  • And here’s the code:

    SELECT
        'SQLDEV:GAUGE:0:20000:1000:5000:' || peeps.salary "WhatIsItYoudSayYouDoHere",
        peeps.salary,
        peeps.first_name
        || ' '
        || peeps.last_name,
        peeps.job_id
    FROM
        hr.employees peeps;
    

    SQLDEV:GAUGE:0:200:50:150 equates to min:max:low threshold:upper threshold:value to graph

    enter image description here