Programme SAP RSORAAJV - Display joins of V$-, GV$- and DBA-Views (Owner SYS)

Title
Display joins of v$-, gv$- and dba-views.

Purpose
This report executes a SQL statement which is stored in the database.The statemtent has to be edited within CCMS (transaction DBACOCKPIT). Inthe selection screen you have to specify an ID of a stored SQL query,which then is executed by this report.
This report may also be executed in batch mode. Alternatively it is alsopossible to start the batch execution from CCMS.

Syntax of the SQL statement:
SELECT [ hint ] [ { DISTINCT | UNIQUE } | ALL ] select_list
FROM table_reference [, table_reference]...
[ WHERE condition ]
[ hierarchical_query_clause ]
[ group_by_clause ]
[ HAVING condition ]
[ { UNION | UNION ALL | INTERSECT | MINUS } ( subquery )]
[ order_by_clause ]
A hint is placed between "/*+" and "*/"
A select list has the following syntax:
{ * |
{[table_alias.]dbfieldname | expression} alias [
,[table_alias.]dbfieldname | expression} alias] ... }
An expression within this select list can be every form ofcalculation: +, -, *, /, ||. Also unary functions are allowed (LN, MIN,AVG ...)
Syntax for a table reference is:
{(select statement) [table_alias] | table [table_alias]}
All other parts of the syntax are according to the sql standard.

Features

Selection
Some conventions and restrictions:

  • Each column that is specified in the select list will be a column in the
  • output list
    • If a select list element is specified with an (column) alias, this alias
    • will be used as header text in the output list. In the other case theprogram uses the field name of the select list element as header text.If a select list element is an expression (no data base field), thealias is obligatory.
      ==> IMPORTANT: For every expression that is no data base field use acolumn alias!
      • Every column alias that is specified in the select list of a subquery
      • can be used like a dbfieldname in the select statement.
        • If more than one table is specified in the from clause, the columns are
        • matched to one table for reasons of unique-ness. If a column name occursin more than one table unique-ness cannot be guaranteed. In this caseyou have to spacify a table alias before the column name (dbfieldname)!
          ==> IMPORTANT: When more than one table is specified, and column namesthat have to be outputted occur in more than one table, use a tablealias!