Oracle Transactional Business Intelligence

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Equivalent of DUAL table in OTBI

Accepted answer
134
Views
2
Comments

Hello,

Is there a way to select from DUAL table in OTBI?

Like if I have a query on a subject area that gets me values and I want to add a fixed value to the results by doing a union with Dual table, or equivalent in OTBI.

Thank you

Best Answer

  • Nathan CCC
    Nathan CCC Rank 7 - Analytics Coach
    Answer ✓

    No but you can add a union to select a constant from a subject area that you know will only return 1 row.

    (select all 0 as s_0, "presentation table"."presentation column" as s from "subject area" ) 
    union all 
    (select all 0 as s_0, 'xx' as s from "subject area" )
    

    for example i added the 1999 row "from dual"

    image.png
    SELECT 
      saw_0,
      saw_1,
      saw_2
     FROM ((SELECT 
      cast("Time"."Year" as character) saw_0,
      "Query Execution"."Success Flag" saw_1,
      "Facts - Usage Metrics"."Report Count" saw_2
     FROM "OTBI Usage Real Time"
    ) UNION (SELECT 
      '1999' saw_0,
      'U' saw_1,
      99 saw_2
     FROM "OTBI Usage Real Time"
    )) t1 ORDER BY saw_0, saw_1
    

Answers