Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ODTUG 2006
Michael Armstrong-Smith
Armstrong-Smith Consulting
Art of using calculations within
Discoverer
Released March
2006
Available on
Amazon.com or via
learndiscoverer.com
Notice the
new icon for
Profit?
Managing security
Row-based
Prevents a complete row being visible to a
user
Item-based
Prevents content of an item being visible to
a user
Row-based security
Row-based security
What do we need?
Database table
Entries in the table
Database function
A calculation
A mandatory condition
Security workflow
Create an index:
CREATE UNIQUE INDEX GEN_SECR_PK ON
GEN_SECR(USERNAME, SEC_TYPE);
Grant access
GRANT SELECT ON GEN_SECR TO PUBLIC;
Syntax:
IF Sales > 9,000,000
THEN HIGH
ELSE IF Sales > 4,000,000
THEN MIDDLE
ELSE LOW
A WHEN – WHEN situation
Click here
List of available templates
Analytic Examples
Base Query
Ranking
Ranking
Rank based on
Use this area to define the item(s) on which the
ranking should be based.
Discoverer will always try to populate this area for
you.
By default, it will use the first data point that it finds.
If this is not the one that you want to rank by,
change it.
You can also state whether the highest value or the
lowest value should be used to start the ranking.
Rank dialog box explained - 2
Rank Ties
This area is used to tell Discoverer whether to use
standard ranking or dense ranking.
Calculation
This area is used by Discoverer to display
the SQL code that will be generated when
you click OK.
You cannot manually change this code at
this time. To change the code, you need to
use the template.
Completing the Ranking
Order rows by
Use this area to define the item(s) that you want to
order the query by.
Calculation
This area is used by Discoverer to display the SQL
code that will be generated when you click OK.
First ranking
RANK() OVER(PARTITION BY Size
ORDER BY Profit DESC )
michael@learndiscoverer.com
Copyright
Downloading the files, placing them on other web sites, sharing them
with other individuals or third parties is prohibited, unless
permission to do so has been granted by the authors or ODTUG.